Location: Symbol Reference > Classes > TJwJobObjectSessionList Class
JWSCL Documentation
ContentsIndexHome
PreviousUpNext
TJwJobObjectSessionList Class
Pascal
TJwJobObjectSessionList = class;

TJwJobObjectSessionList manages a list of job objects threadsafe. Since every process in a job must be in the same session, the list manages one job object per session. 

This solution is only available in Windows Vista and later. 

 
Name 
Description 
 
Create creates a new instance of @Classname.  
 
This is Destroy, a member of class TJwJobObjectSessionList. 
Name 
Description 
The following tables list the members exposed by TJwJobObjectSessionList. 
The methods of the TJwJobObjectSessionList class are listed here. 
The properties of the TJwJobObjectSessionList class are listed here. 
The events of the TJwJobObjectSessionList class are listed here. 
 
Name 
Description 
 
OnNewJobObject defines a callback event that is called every time a new job object must be generated. It is used in AssignProcessToJob. The event must not be nil otherwise the method fails. 
 
Name 
Description 
 
This is the overview for the AssignProcessToJob method overload. 
 
Clear removes all job objects in the list.  
 
Name 
Description 
 
Count returns the count of available job objects/sessions. 
 
JobObject[SessionIndex returns a pointer to an internal job object. The assignment is threadsafe to avoid complication with other methods. 
 
Lock 
Lock returns the internal thread syncronisation object. It can be used to avoid problems with several threads. It should be used for property JobObject because calls to this property may become invalid during processing.  
 
ProcessIndex returns a process handle of a specific job object.
The assignment is threadsafe to avoid complication with other methods.
The exception EJwsclInvalidIndex will be raised if parameter SessionIndex is out of range. The exception ERangeError will be raised if parameter ProcessIndex is out of range. 
 
TerminateJobsOnFree defines whether all or no processes in all job objects should be terminated. This property has no read value because it just goes through all job objects and sets TJwJobObject.TerminateOnDestroy to the given value. 
Copyright (c) 2010. All rights reserved.
This help was created by Doc-O-Matic sponsored by toolsfactory software inc.
What do you think about this topic? Send feedback!