xp_low_priority

xp_low_priority($process)

Creates or sets a process to have a low priority.

Processes with a low priority will be executed after those with a high priority.

Note

This registers the priority as PHP_INT_MAX.

This is not an interruption.

After signal interrupts will still be executed after a low priority process.

Parameters:callable|process – PHP Callable or XPSPLProcess.
Return type:object Process

Example #1 Basic Usage

Low priority processes always execute last.

<?php

xp_signal(XP_SIG('foo'), xp_low_priority(function(){
    echo 'bar';
}));

xp_signal(XP_SIG('foo'), function(){
    echo 'foo';
});

xp_emit(XP_SIG('foo'));

The above code will output.

foobar
Read the Docs v: v5.0.1
Versions
latest
v5.0.1
v5.0.0
v4.0.1
v4.0.0
v3.1.1
v3.1.0
v3.0.0
Downloads
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.