semaphore works, not tested