The IDLAsyncJob class is an abstract base class that represents a unit of work to be done at some point in the future. Submitting these to an IDLAsyncQueue will allow them to be performed as resources become available.
Superclasses
Syntax
Result = IDLAsyncJob([JOIN=IDLAsyncJoin])
Arguments
None
Keywords
JOIN (optional)
Specify the IDLAsyncJoin object to notify when this job has finished execution.
Methods
Properties
All properties are Get-only.
CREATION_TIME
The system time when this job was created.
DONE_TIME
The system time when this job finished execution. The value is 0 if the job has not finished execution.
QUEUED_TIME
The system time when this job was added to an IDLAsyncQueue for execution. The value is 0 if the job has not been queued.
START_TIME
The system time when this job started execution. The value is 0 if the job has not started execution.
STATUS
A scalar string indicating the current status of this job. Status values are:
- ' ' (empty string)
- 'Queued'
- 'Started'
- 'Succeeded'
- 'Failed'
UDATA
User defined data that is relevant to a particular subclass of IDLAsyncJob.
IDLAsyncJob::Done
The IDLAsyncJob::Done method is an event handler invoked by this job on itself when its execution is completed. This method will invoke the OnDone callback on itself, which can be overridden by subclasses to define custom behavior. If the JOIN property was set, then this method will invoke the OnJobDone callback on that object. If this job is currently owned by an IDLAsyncQueue, then it will invoke OnJobDone on that object. Override OnDone instead of this method.
Syntax
IDLAsyncJob.Done, FAILED=value
Arguments
None
Keywords
FAILED
A Boolean value indicating whether this job succeeded or failed execution. The default value is False, indicating a successful job.
IDLAsyncJob::GetReturnValue
The IDLAsyncJob::GetReturnValue method is an abstract interface declaration of the method clients should call to retrieve one or more named variables from this job after it has finished executing. This method must be overridden to retrieve the values from the job.
Syntax
IDLAsyncJob.GetReturnValue [, Variables=Value]
Arguments
None
Keywords
None
IDLAsyncJob::OnDone
The IDLAsyncJob::OnDone method is an abstract interface declaration of the callback invoked on this job by the Done event handler. This method can perform any cleanup when the job is finished executing. Subclasses must override this method instead of Done. This method should not throw any errors to avoid breaking the class.
Syntax
IDLAsyncJob.OnDone
Arguments
None
Keywords
None
IDLAsyncJob::OnQueued
The IDLAsyncJob::OnQueued method is an abstract interface declaration of the callback invoked on this job by the Queued event handler. Subclasses must override this method instead of Queued. This method should not throw any errors to avoid breaking the class.
Syntax
IDLAsyncJob.OnQueued
Arguments
None
Keywords
None
IDLAsyncJob::OnStart
The IDLAsyncJob::OnStart method is an abstract interface declaration of the callback invoked on this job by the Start event handler. This is the method that defines what this job actually does when executed. Subclasses must override this method instead of Start. This method should not throw any errors to avoid breaking the class.
Syntax
IDLAsyncJob.OnStart
Arguments
None
Keywords
None
IDLAsyncJob::Queued
The IDLAsyncJob::Queued method is an event handler invoked on this job when it is added to an IDLAsyncQueue. This method will invoke the OnQueued callback on itself, which can be overridden by subclasses for custom behavior. Override OnQueued instead of this method.
Syntax
IDLAsyncJob.Queued, Queue
Arguments
Queue
The IDLAsyncQueue object that now owns this job and will execute it at some point in the future.
Keywords
None
IDLAsyncJob::Start
The IDLAsyncJob::Start method is an event handler to begin this job's execution. It is invoked on this job when the IDLAsyncQueue that owns it has available concurrency and wants this job to begin. This method will invoke the OnStart callback on itself, which is to be overridden by subclasses to define this job's execution. Override OnStart instead of this method.
Syntax
IDLAsyncJob.Start
Arguments
None
Keywords
None
Version History
See Also
IDLAsyncQueue, IDLAsyncBridgeJob, IDLAsyncSpawnJob, IDLAsyncJoin