EventConfig::setMaxDispatchInterval

(PECL event >= 2.1.0-alpha)

EventConfig::setMaxDispatchIntervalPrevents priority inversion

Description

public EventConfig::setMaxDispatchInterval( int $max_interval , int $max_callbacks , int $min_priority ): void

Prevents priority inversion by limiting how many low-priority event callbacks can be invoked before checking for more high-priority events.

Note:

Available since libevent 2.1.0-alpha.

Parameters

max_interval

An interval after which Libevent should stop running callbacks and check for more events, or 0, if there should be no such interval.

max_callbacks

A number of callbacks after which Libevent should stop running callbacks and check for more events, or -1, if there should be no such limit.

min_priority

A priority below which max_interval and max_callbacks should not be enforced. If this is set to 0, they are enforced for events of every priority; if it's set to 1, they're enforced for events of priority 1 and above, and so on.

Return Values

Returns true on success or false on failure.

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant