TaskPool

Description

sealed class Tinman.Core.Threading.Pooling.TaskPool

Derived from

Disposable abstract

The pool for running background tasks.

Public / Methods

Block​Begin


public static method BlockBegin → ()

A thread may call this method in order to notify the TaskPool that it will perform a blocking system call.

If the calling thread is not managed by the TaskPool, the method silently returns.

For each call to BlockBegin, the BlockEnd method must be called exactly once.

Block​End


public static method BlockEnd → ()

After calling the BlockBegin method, the thread must call this method in order to notify the TaskPool that the blocking system call has finished.

If the calling thread is not managed by the TaskPool, the method silently returns.

For each call to BlockBegin, the BlockEnd method must be called exactly once.

Wait


public static method Wait → ()

Blocks the calling thread until a task pool event takes place or a timeout occurs.

Public / Attributes

Parallelism


public static attribute Parallelism → (get,set)

value : int32

[>=0]
The maximum number of non-blocked background tasks. If 0, the value of LowLevel.ProcessorCount* 7 / 8 is used.

Maximum count of non-blocked background tasks being executed in parallel.

The default value is 0.

Priority


public static attribute Priority → (get,set)

value : ThreadPriority

The thread priority.

The priority to use for newly spawned background task threads.

The default priority is ThreadPriority.Lower.