set up broadcast thread with semaphores