$DaemonParentNumber: Difference between revisions
m (1 revision) |
m (1 revision) |
||
Line 21: | Line 21: | ||
</p> | </p> | ||
This $function is new in Version 6.8 of the | This $function is new in Version 6.8 of the <var class="product">[[Sirius Mods]]</var>.<p> | ||
[[Category:$Functions|$DaemonParentNumber]] | [[Category:$Functions|$DaemonParentNumber]] |
Revision as of 22:05, 16 June 2012
Get user number of parent thread
Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $DaemonParentNumber function is the ParentNumber (Daemon property). The OO APIs emphasize the use of the Daemon methods; users are strongly urged to use the new Daemon API instead of the old $functions.
This function can be used to get the user number of an sdaemon's parent thread.
The $DaemonParentNumber function accepts no arguments.
Syntax
<section begin="syntax" /> %USERN = $DaemonParentNumber <section end="syntax" />
The $DaemonParentNumber function returns the user number of the thread that created the daemon thread, whether the daemon is associated with a Daemon object or with a $COMMxx function.
If the thread issuing $DaemonParentNumber is not an sdaemon, or is an sdaemon but is not performing work for another thread via a Daemon object or a $COMMxx function, or is an asynchronous daemon, the $DaemonParentNumber function returns a -1 value. The following code audits a thread's parent user number:
audit 'My parents user number is ' $DaemonParentNumber
This $function is new in Version 6.8 of the Sirius Mods.