Added example for semaphore