public function waitForSignal()
    {
        if ($this->isTerminated()) {
            throw new \RuntimeException(sprintf('Terminated %s cannot enter wait state', $this));
        }
        
        $this->timestamp = microtime(true);
        $this->setState(self::STATE_WAIT, true);
        
        $this->engine->debug('{execution} entered wait state', [
            'execution' => (string) $this
        ]);
        
        $this->markModified();
    }