SimpleSemaphore improved