PHP - Manual: event_base_priority_init
2024-12-21
(PECL libevent >= 0.0.2)
event_base_priority_init — Set the number of event priority levels
$event_base
, int $npriorities
) : boolSets the number of different event priority levels.
By default all events are scheduled with the same priority
(npriorities
/2).
Using event_base_priority_init() you can change the number
of event priority levels and then set a desired priority for each event.
event_base
Valid event base resource.
npriorities
The number of event priority levels.
event_base_priority_init() returns TRUE
on success or FALSE
on error.
官方地址:https://www.php.net/manual/en/function.event-base-priority-init.php