Fully working tested semaphore.fs can use directly with your own variable or use the structure that manages the semaphore for you!