Merge "Replace Semaphore with AtomicInteger"