Class DefaultThreadPool
An implementation of the TaskSchedulerThreadPool using the default task scheduler
public sealed class DefaultThreadPool : TaskSchedulingThreadPool, IThreadPool
- Inheritance
-
DefaultThreadPool
- Implements
- Inherited Members
Constructors
DefaultThreadPool(ILogger<TaskSchedulingThreadPool>?)
public DefaultThreadPool(ILogger<TaskSchedulingThreadPool>? logger = null)
Parameters
loggerILogger<TaskSchedulingThreadPool>Where the pool reports what it is doing. A pool the container builds is handed the application's logger; one constructed by hand —
UseThreadPool(instance)— is handed nothing and reads LogProvider, as every pool did before.
Remarks
Declared rather than left implicit so that the container has a constructor to fill the logger
into: this is the pool UseDefaultThreadPool registers, and it is built by
ActivatorUtilities.
Methods
GetDefaultScheduler()
Returns TaskScheduler.Default
protected override TaskScheduler GetDefaultScheduler()
Returns
- TaskScheduler
TaskScheduler.Default