function Driver::enable
Enable a callback to be active starting in the next tick.
Callbacks MUST immediately be marked as enabled, but only be activated (i.e. callbacks can be called) right before the next tick. Callbacks MUST NOT be called in the tick they were enabled.
Parameters
string $callbackId The callback identifier.:
Return value
string The callback identifier.
Throws
InvalidCallbackError If the callback identifier is invalid.
2 methods override Driver::enable()
- AbstractDriver::enable in vendor/
revolt/ event-loop/ src/ EventLoop/ Internal/ AbstractDriver.php - Enable a callback to be active starting in the next tick.
- TracingDriver::enable in vendor/
revolt/ event-loop/ src/ EventLoop/ Driver/ TracingDriver.php - Enable a callback to be active starting in the next tick.
File
-
vendor/
revolt/ event-loop/ src/ EventLoop/ Driver.php, line 189
Class
- Driver
- The driver MUST run in its own fiber and execute callbacks in a separate fiber. If fibers are reused, the driver needs to call {
Namespace
Revolt\EventLoopCode
public function enable(string $callbackId) : string;