CMSThread Class |
Namespace: CMS.Base
public class CMSThread : AbstractWorker, IDisposable
The CMSThread type exposes the following members.
Name | Description | |
---|---|---|
CMSThread(ThreadStart, ThreadSettings) |
Constructor.
| |
CMSThread(ThreadStart, Boolean, ThreadModeEnum) |
Constructor.
|
Name | Description | |
---|---|---|
ABORT_REASON_STOP |
Thread was stopped by the user.
|
Name | Description | |
---|---|---|
AllowAsyncActions |
Indicates if new threads can be created within this thread. (By default no new threads are created.)
| |
Cancel |
If true, the worker is cancelled (doesn't execute)
(Inherited from AbstractWorker.) | |
ConnectionString |
Connection string name that the thread should use to access the database
| |
InnerThread |
Worker object.
| |
IsBackground |
Defines if a thread is a background thread
| |
Log |
Logs for long running operations.
| |
MethodClassName |
Name of the class which is running the thread actions.
| |
MethodName |
Name of the method which is running the thread actions.
| |
Mode |
If true, the thread runs synchronously
| |
Priority |
Specifies the scheduling priority.
| |
RequestUrl |
Request URL which created the thread.
| |
RunInSequence |
If true, the thread is a part of the sequence and should perform the actions after the previous thread finishes.
(Inherited from AbstractWorker.) | |
RunningThreads |
Counter of running Threads.
| |
ThreadFinished |
Time when the thread finished.
| |
ThreadGUID |
Thread GUID.
| |
ThreadID |
Thread ID.
| |
ThreadStarted |
Time when the thread started.
|
Name | Description | |
---|---|---|
Abort |
Aborts the thread execution.
In case of sync mode thread, this method also kills all CMSThreads running under same InnerThread.
| |
AllowEmptyContext |
Allows anonymous thread to use new dedicated context in subsequent calls.
Call this method in case the anonymous thread isn't initiated from a request thread, or in case you want to start with an empty thread context on purpose.
| |
CloseThreadContext |
Closes the thread context.
| |
Dispose |
Disposes the thread object.
| |
GetCurrentThreadId |
Gets the current thread ID
| |
GetDuplicityKey |
Gets the duplicity key for the worker to eliminate duplicit queued workers.
(Inherited from AbstractWorker.) | |
GetThread |
Finds the thread based on the given GUID.
| |
Join |
Blocks the calling thread until a thread terminates, while continuing to perform standard COM and SendMessage pumping.
| |
LoadTargetDelegateInfo |
Sets the target delegate information
| |
PrepareEmptyThreadContext |
Prepares empty thread context for thread with UseEmptyContext set.
| |
PrepareThreadContext |
Prepares the thread context
| |
RaiseStop |
Raises OnStop event.
(Inherited from AbstractWorker.) | |
Run |
Runs the action.
(Overrides AbstractWorkerRun.) | |
RunAsync |
Runs the worker as a new thread. For internal purposes only, use method Start instead.
(Overrides AbstractWorkerRunAsync.) | |
Start |
Starts the thread.
| |
Stop |
Stops the thread execution (doesn't log abort exception).
In case of sync mode thread, this method only stops this and child synchronous threads.
Parent threads running under same InnerThread will continue running.
| |
Stopped |
Returns true if thread was aborted with ABORT_REASON_STOP state info e.g. Thread.Abort(CMSThread.ABORT_REASON_STOP);
| |
WaitForSequence |
Waits for the current sequence thread to terminate
| |
Wrap(Action, Boolean) |
Wraps the given method into CMSThread context
| |
WrapT(ActionT, Boolean) |
Wraps the given method into CMSThread context
| |
WrapT1, T2(ActionT1, T2, Boolean) |
Wraps the given method into CMSThread context
| |
WrapFuncTResult(FuncTResult, Boolean) |
Wraps the given method into CMSThread context
| |
WrapFuncT1, TResult(FuncT1, TResult, Boolean) |
Wraps the given method into CMSThread context
|
Name | Description | |
---|---|---|
OnStop |
Raised when worker finishes.
(Inherited from AbstractWorker.) |