Try to implement two type of the semaphore