Replaced Semaphore with (superior) ReentrantLock (#606)Replaced Semaphore with (superior) ReentrantLock (commit: 74eb69c)