TaskGroup

Description

sealed class Tinman.Core.Threading.Pooling.TaskGroup

Derived from

Disposable abstract

Handle object that represents a task group.

Public / Constructors

TaskGroup


public constructor TaskGroup → (1)

name in : string

[not-empty]
The task group name. This is usually the name of the class that creates the task group.

Creates a new instance of TaskGroup.

Public / Methods

Cancel


[ThreadSafe]
public method Cancel → (1)

wait in : bool

true to wait for pending group tasks, false to return immediately.

Cancels all queued tasks in this group and optionally waits for all pending ones to terminate.

RunSynchronized


[ThreadSafe]
public method RunSynchronized → ()

returns → bool

true if at least one task has been run, false if there are no pending tasks.

Runs all pending tasks in this given group that are flagged with TaskFlags.Synchronized in the callers thread.

Public / Attributes

Monitor


public attribute Monitor → (get)

value : Monitor

[not-null]
The synchronization monitor.

A synchronization monitor that belongs to this task group.

Name


public attribute Name → (get)

value : string

[not-empty]
The full name.

Returns the full name of this task group.