New (Daemon constructor)
Create a new Daemon (Daemon class)
New creates a new Daemon object instance. It has two, optional, arguments.
Syntax
%daemon = [%(Daemon):]New[( [CopyGlobals= boolean], [Transactional= boolean], - [OpenAll= boolean])] Throws MaxDaemExceeded, NoFreeDaemons, DaemonLost
Syntax terms
%daemon | A previously defined Daemon object. |
---|---|
CopyGlobals | An optional, but NameRequired parameter whose value is a Boolean enumeration.
The default is
If set to True :
|
Transactional | An optional, but NameRequired parameter whose value is a Boolean enumeration.
|
Exceptions
This subroutine can throw the following exceptions:
- NoFreeDaemons
- If there are no daemon threads available to service the object, a NoFreeDaemons exception is thrown. This exception will only be thrown in "Sirius Mods" Version 7.2 and later.
Usage notes
- New not only creates a Daemon object in the user tables, but it also finds a free sdaemon thread and dedicates it to the issuing user. If no sdaemon threads are available, the request is cancelled.
- The number of daemons allowed per master thread is limited by the MAXDAEM system parameter, whose default value is 1.
- If you specify
CopyGlobals=True
, and if there is insufficient server space (say, if daemons start out with very big tables, except for GTBL, and the master has a very big GTBL), the daemon fails during initialization.