Recently I wrote an article about how I handled semaphores in a Drupal project. I want to talk about how I actually implemented it. I needed more than one function to use the semaphore. The goal was to prevent one function to be called when the semaphore was active. The semaphore would get activated when the function would run. Basically, prevent the functions from running at the same time.