function EventDriver::__construct
Overrides AbstractDriver::__construct
File
-
vendor/
revolt/ event-loop/ src/ EventLoop/ Driver/ EventDriver.php, line 37
Class
Namespace
Revolt\EventLoop\DriverCode
public function __construct() {
parent::__construct();
/** @psalm-suppress TooFewArguments https://github.com/JetBrains/phpstorm-stubs/pull/763 */
$this->handle = new \EventBase();
if (self::$activeSignals === null) {
self::$activeSignals =& $this->signals;
}
$this->ioCallback = function ($resource, $what, StreamCallback $callback) : void {
$this->enqueueCallback($callback);
};
$this->timerCallback = function ($resource, $what, TimerCallback $callback) : void {
$this->enqueueCallback($callback);
};
$this->signalCallback = function ($signo, $what, SignalCallback $callback) : void {
$this->enqueueCallback($callback);
};
}