Checks and returns the current status of the requested callback handler
instance. You can use this function to check if a specific script execution
instance (thread) is still alive. You have to pass the callback ID of the
one you are intested in. There are various ways to get a callback ID. For
example to get the currently running event handler's own callback ID you can
read the built-in variable
$NI_CALLBACK_ID which you then may
hand over to other threads i.e. by storing it as user variable. Or if you
spawned your own threads by calling
fork() you may get the
callback ID of the child threads by reading the array variable
%NKSP_CALLBACK_CHILD_ID, or for the parent thread by reading
$NKSP_CALLBACK_PARENT_ID. Refer to
fork() for more
details about the latter two built-in variables.
|Argument Name||Data Type||Description|
||Callback ID Number||Status of this script thread will be checked.
Returns one of the following integer number values:
||The callback is no longer alive and thus will no longer execute, so it either terminated regularly or because of an error.|
||The callback is alive, but is currently not executing. It is
currently waiting to be resumed by the scheduler. This might
be the case i.e. if the callback has just been created and
has not been executed by the scheduler at all yet, or if
the callback is currently suspended i.e. because it called
||The callback is alive and is actually executing at this moment. You will get this result value i.e. if a callback checks the status of itself.|
$CALLBACK_STATUS_RUNNINGare defined as bit flags, and since other bit flags might be added in future you should only compare those two return values bitwise.
Since LinuxSampler 2.0.0.svn66.