Logical
|
The LogicalThreadOperation type exposes the following members.
Name | Description | |
---|---|---|
LogicalThreadOperation(LogicalThread, Action, Boolean) | Creates a new instance of the LogicalThreadOperation class. | |
LogicalThreadOperation(LogicalThread, Action, Int32, Boolean) | Creates a new instance of the LogicalThreadOperation class. |
Name | Description | |
---|---|---|
AutoRunIfPending | Gets flag that determines if RunIfPending will be called automatically. | |
IsPending | Gets a value to indicate whether the operation has an additional operation that is pending execution after the currently running operation has completed. | |
IsRunning | Gets a value to indicate whether the operation is currently executing actions. | |
Priority | Gets or sets default priority for logical thread operation. |
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
ExecuteAction | Executes an action once on the current thread. | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) | |
GetHashCode | Serves as the default hash function. (Inherited from Object) | |
GetType | Gets the Type of the current instance. (Inherited from Object) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) | |
RequeueAction | If the operation is running, the action has yet to be executed, and the given priority level differs from the queued action's priority level, this method will requeue the action at the given priority level. | |
RunIfPending | Starts the operation over at the beginning if the operation is pending or sets the operation state back to not running so it can run again. | |
RunOnce | Executes the action on the current thread or marks the operation as pending if the operation is already running. | |
RunOnceAsync | Executes the action on another thread or marks the operation as pending if the operation is already running. | |
ToString | Returns a string that represents the current object. (Inherited from Object) | |
TryRunOnce | Attempts to execute the action on the current thread. Does nothing if the operation is already running. | |
TryRunOnceAsync | Attempts to execute the action on another thread. Does nothing if the operation is already running. |
Name | Description | |
---|---|---|
GetEnumValueOrDefault |
Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions) | |
GetEnumValueOrDefaultT |
Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions) |
LogicalThread thread1 = new LogicalThread(); LogicalThread thread2 = new LogicalThread(); // Create logical thread operation with manually controlled call to RunIfPending LogicalThreadOperation operation = new LogicalThreadOperation(thread1, DoOperation, false); private void DoOperation() { ExecuteOnThread1(); thread2.Push(() => operation.ExecuteAction(() => { ExecuteOnThread2(); operation.RunIfPending(); })); });