only initialize the semaphore if we have created it