semaphore.class.php