Use semaphores instead of ports