refactored semaphore and binarySemaphore
Merge branch 'master' of https://github.com/bertobot/MyThread