added semaphore-based thread communication examples