Class MaxConcurrencySyncContext
An implementation of SynchronizationContext which runs work on custom threads rather than in the thread pool, and limits the number of in-flight actions.
public class MaxConcurrencySyncContext : SynchronizationContext, IDisposable
- Inheritance
-
MaxConcurrencySyncContext
- Implements
- Inherited Members
Constructors
MaxConcurrencySyncContext(int)
Initializes a new instance of the MaxConcurrencySyncContext class.
public MaxConcurrencySyncContext(int maximumConcurrencyLevel)
Parameters
maximumConcurrencyLevelintThe maximum number of tasks to run at any one time.
Methods
Dispose()
public void Dispose()
Post(SendOrPostCallback, object?)
public override void Post(SendOrPostCallback d, object? state)
Parameters
dSendOrPostCallbackstateobject
Send(SendOrPostCallback, object?)
public override void Send(SendOrPostCallback d, object? state)
Parameters
dSendOrPostCallbackstateobject