This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
uphp:functions:setpriority [2017/05/16 06:06] admin created |
uphp:functions:setpriority [2021/09/13 05:57] (current) |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== setpriority($val) | + | ======setpriority====== |
| - | This can be used to run a script with a higher priority if required. | + | |
| - | This will also set the max_concurrent_scripts to 1 to prevent other scripts from starting while this is set, so make sure to unset the priority by passing a 0 value once you have done your critical processing. | + | < |
| + | |||
| + | Set the < | ||
| + | |||
| + | ====Description==== | ||
| + | |||
| + | <well size=" | ||
| + | <span style=" | ||
| + | <span style=" | ||
| + | <span style=" | ||
| + | <span style=" | ||
| + | </ | ||
| + | |||
| + | This function can be used to run a script with a higher priority if required. | ||
| + | |||
| + | This will also set [[software: | ||
| + | |||
| + | ====Parameter==== | ||
| + | |||
| + | < | ||
| + | |||
| + | * **= 0** - Normal default priority | ||
| + | * **> 0** - Elevated priority | ||
| + | |||
| + | ====Return Values==== | ||
| + | |||
| + | None | ||
| + | |||
| + | ====Example==== | ||
| - | Example: | ||
| <code php> | <code php> | ||
| <? | <? | ||
| - | // some code | + | |
| - | setpriority(1); | + | setpriority(1); |
| - | // this will now run exclusively | + | // this will now run exclusively ... |
| - | ... | + | setpriority(0); |
| - | setpriority(0); | + | |
| ?> | ?> | ||
| + | </ | ||
| + | |||
| + | ====Also See==== | ||
| + | |||
| + | [[software: | ||
| + | |||
| + | [[max_execution_time()]] - Set the maximum execution time for the current script | ||
| + | |||
| + | [[process_list()]] - Return an < | ||