rename leaving to departure
semaphore barrier analysis and design
refactor barrier semaphore sync