public function getReadyForBed()
    {
        $busyStatusses = array(ChildProcessContainer::STATUS_SLEEPY,
            ChildProcessContainer::STATUS_BUSY_BUT_SLEEPY
        );
        if (in_array($this->status, $busyStatusses)) {
            //ready for bed
            return;
        }
        if($this->status  == ChildProcessContainer::STATUS_DEAD)
        {
            // do nothing
        }
        else if ($this->status == ChildProcessContainer::STATUS_BUSY) {
            $this->status = ChildProcessContainer::STATUS_BUSY_BUT_SLEEPY;
        } else {
            $this->status = ChildProcessContainer::STATUS_SLEEPY;
        }
        if ($this->process->isRunning()) {
            $this->sendTERMSignal();
        }
    }
public function getReadyForBed()
    {
        $busyStatusses = array(ChildProcessContainer::STATUS_SLEEPY,
            ChildProcessContainer::STATUS_BUSY_BUT_SLEEPY
        );
        if (in_array($this->status, $busyStatusses)) {
            //ready for bed
            return;
        }
        if($this->status  == ChildProcessContainer::STATUS_DEAD)
        {
            // do nothing
        }
        else if ($this->status == ChildProcessContainer::STATUS_BUSY) {
            $this->status = ChildProcessContainer::STATUS_BUSY_BUT_SLEEPY;
        } else {
            $this->status = ChildProcessContainer::STATUS_SLEEPY;
        }
        if ($this->process->isRunning()) {
            $this->sendTERMSignal();
        }
    }
public function getReadyForBed ( ) { $ busyStatusses = array ( ChildProcessContainer :: STATUS_SLEEPY , ChildProcessContainer :: STATUS_BUSY_BUT_SLEEPY ) ; if ( in_array ( $ this -> status , $ busyStatusses ) ) { //ready for bed return ; } if ( $ this -> status == ChildProcessContainer :: STATUS_DEAD ) { // do nothing } else if ( $ this -> status == ChildProcessContainer :: STATUS_BUSY ) { $ this -> status = ChildProcessContainer :: STATUS_BUSY_BUT_SLEEPY ; } else { $ this -> status = ChildProcessContainer :: STATUS_SLEEPY ; } if ( $ this -> process -> isRunning ( ) ) { $ this -> sendTERMSignal ( ) ; } }
Tells the child to not pick up any more work and go to bed

@return void
Tells the child to not pick up any more work and go to bed