Represents a item of work in the ThreadManager. Also allows access to the Parent TapThread (the thread that initially calledTapThread.Start(Action, string))
More...
|
void | Abort () |
| Aborts the execution of this current instance of the TapThread.
|
|
override string | ToString () |
| Returns a readable string. More...
|
|
|
static void | WithNewContext (Action action, TapThread parent) |
| Pretends that the current thread is a different thread while evaluating 'action'. This affects the functionality of ThreadHierarchyLocals and TapThread.Current. This overload also specifies which parent thread should be used.
|
|
static void | WithNewContext (Action action) |
| Pretends that the current thread is a different thread while evaluating 'action'. This affects the functionality of ThreadHierarchyLocals and TapThread.Current.
|
|
static TapThread | Start (Action action, string name="") |
| Enqueue an action to be executed asynchronously. More...
|
|
static void | Sleep (int millisecondsTimeout) |
| Blocks the current thread until the current System.Threading.WaitHandle receives a signal, using a 32-bit signed integer to specify the time interval in milliseconds. More...
|
|
static void | ThrowIfAborted () |
| Throws an OperationCancelledException if the current TapThread has been aborted. This is the same as calling TapThread.Current.AbortToken.ThrowIfCancellationRequested().
|
|
static void | Sleep (TimeSpan timeSpan) |
| Blocks the current thread for a specified amount of time. Will throw an OperationCancelledException if the thread is aborted during this time. More...
|
|
|
readonly string | Name |
| An (optional) name identifying the OpenTAP thread.
|
|
|
static TapThread? | Current [get] |
| The currently running TapThread
|
|
TapThreadStatus | Status [get] |
| The execution status of the work
|
|
CancellationToken | AbortToken [get] |
| The abort token for this thread. Provides an interface to check the cancellation status of the current thread. Note, the status of this token is inherited from parent threads.
|
|
TapThread | Parent [get] |
| The parent TapThread that started this thread. In case it is null, then it is not a managed TapThread.
|
|
Represents a item of work in the ThreadManager. Also allows access to the Parent TapThread (the thread that initially calledTapThread.Start(Action, string))
◆ Sleep() [1/2]
static void OpenTap.TapThread.Sleep |
( |
int |
millisecondsTimeout | ) |
|
|
inlinestatic |
Blocks the current thread until the current System.Threading.WaitHandle receives a signal, using a 32-bit signed integer to specify the time interval in milliseconds.
- Parameters
-
millisecondsTimeout | The number of milliseconds to wait, or 0 by default. |
◆ Sleep() [2/2]
static void OpenTap.TapThread.Sleep |
( |
TimeSpan |
timeSpan | ) |
|
|
inlinestatic |
Blocks the current thread for a specified amount of time. Will throw an OperationCancelledException if the thread is aborted during this time.
- Parameters
-
timeSpan | A System.TimeSpan that represents the number of milliseconds to wait. |
◆ Start()
static TapThread OpenTap.TapThread.Start |
( |
Action |
action, |
|
|
string |
name = "" |
|
) |
| |
|
inlinestatic |
Enqueue an action to be executed asynchronously.
- Parameters
-
action | The action to be executed. |
name | The (optional) name of the OpenTAP thread. |
◆ ToString()
override string OpenTap.TapThread.ToString |
( |
| ) |
|
|
inline |
Returns a readable string.
- Returns