SemaphoreMain example