Class SemaphoreExecutor<TKey>
Allows execution of one thread at a time, for a specific key. Threads with different keys will be executed in parallel. Thread with the same key will be executed one at a time.
public class SemaphoreExecutor<TKey>
Type Parameters
TKey
- Inheritance
-
SemaphoreExecutor<TKey>
- Inherited Members
- Extension Methods
Methods
ExecuteAsync<T>(TKey, Func<Task<T>>)
public Task<T> ExecuteAsync<T>(TKey key, Func<Task<T>> action)
Parameters
Returns
- Task<T>
Type Parameters
T