/**
* Halt execution and wait for target process to finish
*
* @param Process $process
*/
public function resolve(Process $process)
{
$options = $process->getOptions();
$promise = array_key_exists(self::PROMISE_KEY, $options) ? $options[self::PROMISE_KEY] : null;
if ($promise instanceof PromiseInterface) {
$promise->wait(false);
}
$this->queue->remove($process);
}