https://stackoverflow.com/questions/12104978/need-to-semaphore-relase-if-semaphore-acquire-gets-interruptedexception