ThreadPool.PendingWorkItemCount Property

Definition

Gets the number of work items that are currently queued to be processed.

C#
public static long PendingWorkItemCount { get; }

Property Value

The number of work items that are currently queued to be processed.

Remarks

If a thread pool implementation may have different types of work items, the count includes all types that can be tracked, which may only be the user work items, including tasks. Some implementations may also include queued timer and wait callbacks in the count. On Windows, the count is unlikely to include the number of pending IO completions, because they are posted directly to an IO completion port.

Applies to

Product Versions
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9