update page now

pcntl_setqos_class

(PHP 8 >= 8.4.0)

pcntl_setqos_classSet the QoS class of the current thread

Descrição

pcntl_setqos_class(Pcntl\QosClass $qos_class = Pcntl\QosClass::Default): void

Set the QoS class.

Parâmetros

qos_class

The Quality of Service class to assign to the current thread. The operating system uses this as a hint to schedule CPU time, I/O priority, and energy usage, with higher classes preempting lower ones. See Pcntl\QosClass for the available cases.

Pcntl\QosClass::UserInteractive
Highest priority. Intended for work that directly drives a user interface and must complete virtually instantly to avoid perceived delay, such as event handling or drawing.
Pcntl\QosClass::UserInitiated
High priority, just below UserInteractive. Intended for work the user has explicitly initiated and is actively waiting on, expected to complete within a few seconds.
Pcntl\QosClass::Default
Standard priority, used when no more specific class applies. Runs after higher-priority work but ahead of Utility and Background.
Pcntl\QosClass::Utility
Lower priority, intended for long-running work the user is aware of but not actively waiting on, such as downloads, imports, or bulk computation. Scheduled in an energy-efficient manner.
Pcntl\QosClass::Background
Lowest priority, intended for work the user is not aware of, such as prefetching, indexing, or maintenance. Heavily optimized for energy efficiency and may be deferred when the system is under load.

Nota: This function is only available on Apple platforms.

Valor Retornado

Nenhum valor é retornado.

Erros/Exceções

Throws an Error if the underlying call to pthread_set_qos_class_self_np() fails.

Veja Também

adicionar nota

Notas de Usuários

Não há notas de usuários para esta página.
To Top