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 |
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