performance
i see dead code
performance - replace the old reentrant lockable with the semaphore lockable