Revamp local semaphores

Check queue status at termination