moved semaphore lock outside of try catch, if it goes bang we don't want to release it
Merge branch 'master' of github.com:NimbusAPI/Nimbus into thread-starvation
Tidied up semaphore entries (moved outside of try/finally blocks).