src/Semaphore.php
public function synchronize(\Closure $closure) {
		$this->acquire();
		call_user_func($closure);
		$this->release();
		return $this;
	}
public function synchronize(\Closure $closure) {
		$this->acquire();
		call_user_func($closure);
		$this->release();
		return $this;
	}
Run something synchronized
@param \Closure $closure the closure, that should be run synchronized
@throws SemaphoreException in case of an error
@return \QXS\WorkerPool\Semaphore the current object