$DaemonParentNumber: Difference between revisions
(Created page with "{{DISPLAYTITLE:$DaemonParentNumber}} <span class="pageSubtitle"><section begin="desc" />Get user number of parent thread<section end="desc" /></span> <p class="warning">Most Sir...") |
m (1 revision) |
(No difference)
|
Revision as of 15:44, 31 January 2011
<section begin="desc" />Get user number of parent thread<section end="desc" />
Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $DaemonParentNumber function is to be entered.
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
The $DaemonParentNumber method has a Daemon class method equivalent: ParentNumber (see the Janus SOAP Reference Manual). The $function and method can be used interchangeably, whether the daemon was created with a $COMMxx function or a Daemon object, so the decision of which to use is largely a matter of taste.
For more information about sdaemons,
This $function is new in Version 6.8 of the Sirius Mods.
- &SFUNC