Interop\Async\Loop\Driver::onSignal PHP Method

onSignal() abstract public method

Warning: Installing the same signal on different instances of this interface is deemed undefined behavior. Implementations MAY try to detect this, if possible, but are not required to. This is due to technical limitations of the signals being registered globally per process. Multiple watchers on the same signal MAY be executed in any order.
abstract public onSignal ( integer $signo, callable $callback, mixed $data = null ) : string
$signo integer The signal number to monitor.
$callback callable
$data mixed Arbitrary data given to the callback function as the $data parameter.
return string An unique identifier that can be used to cancel, enable or disable the watcher.
    public abstract function onSignal($signo, callable $callback, $data = null);