Class AsyncCountdownEvent
- Namespace
- Microsoft.VisualStudio.Threading
- Assembly
- Microsoft.VisualStudio.Threading.dll
An asynchronous style countdown event.
public class AsyncCountdownEvent
- Inheritance
-
AsyncCountdownEvent
- Inherited Members
Constructors
AsyncCountdownEvent(int)
Initializes a new instance of the AsyncCountdownEvent class.
public AsyncCountdownEvent(int initialCount)
Parameters
initialCount
intThe number of signals required to unblock awaiters.
Methods
Signal()
Decrements the counter by one.
public void Signal()
SignalAndWaitAsync()
Decrements the counter by one and returns an awaitable that executes the continuation when the countdown reaches zero.
public Task SignalAndWaitAsync()
Returns
- Task
An awaitable.
WaitAsync()
Returns an awaitable that executes the continuation when the countdown reaches zero.
public Task WaitAsync()
Returns
- Task
An awaitable.