code: public function takeFreeProcess() {
  		if ($this->getFreeProcessesCount() === 0) {
  			return NULL;
  		}
  		$freePid = array_shift($this->freeProcessIds);
  		if ($freePid === NULL) {
  			return NULL;
  		}
  		return $this->getProcessDetails($freePid);
  	}
docs: Takes one ProcessDetails from the list of free ProcessDetails. Returns NULL if no free process is available.
  
  @return ProcessDetails