function EventLoop::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.
File
-
vendor/
revolt/ event-loop/ src/ EventLoop.php, line 228
Class
- EventLoop
- Accessor to allow global access to the event loop.
Namespace
RevoltCode
public static function enable(string $callbackId) : string {
return self::getDriver()->enable($callbackId);
}