Exemplo n.º 1
0
 /// <summary>
 /// Creates an async-compatible countdown event.
 /// </summary>
 /// <param name="count">The number of signals this event will need before it becomes set. Must be greater than zero.</param>
 public AsyncCountdownEvent(int count)
 {
     _tcs = new TaskCompletionSource();
     _count = count;
     //Enlightenment.Trace.AsyncCountdownEvent_CountChanged(this, -1, count);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TaskCompletionSource"/> class with the specified state and options.
 /// </summary>
 /// <param name="state">The state to use as the underlying <see cref="Task"/>'s <see cref="IAsyncResult.AsyncState"/>.</param>
 /// <param name="creationOptions">The options to use when creating the underlying <see cref="Task"/>.</param>
 public TaskCompletionSource(object state, TaskCreationOptions creationOptions)
 {
     _tcs = new TaskCompletionSource<object>(state, creationOptions);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TaskCompletionSource"/> class with the specified state.
 /// </summary>
 /// <param name="state">The state to use as the underlying <see cref="Task"/>'s <see cref="IAsyncResult.AsyncState"/>.</param>
 public TaskCompletionSource(object state)
 {
     _tcs = new TaskCompletionSource<object>(state);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TaskCompletionSource"/> class with the specified options.
 /// </summary>
 /// <param name="creationOptions">The options to use when creating the underlying <see cref="Task"/>.</param>
 public TaskCompletionSource(TaskCreationOptions creationOptions)
 {
     _tcs = new TaskCompletionSource<object>(creationOptions);
 }
Exemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TaskCompletionSource"/> class.
 /// </summary>
 public TaskCompletionSource()
 {
     _tcs = new TaskCompletionSource<object>();
 }