Documentation
IPS_ScriptThreadExists
bool IPS_ScriptThreadExists (int $ThreadID)
Parameters
| ThreadID | ID of the thread to be checked |
Returns
If the thread exists, TRUE is returned, otherwise FALSE.
Description
The function checks whether the thread with the ID ThreadID exists.
PHP scripts are executed in a fixed pool of threads. The number of threads is set by the special switch ThreadCount (default 50, at least 25), and the threads have the IDs 1 to ThreadCount. Within a script, the system variable $_IPS['THREAD'] contains the ID of the own thread. Without PHP support, no threads exist.
Example
if (IPS_ScriptThreadExists(1)) {
print_r(IPS_GetScriptThread(1));
}