Exemplo n.º 1
0
 internal void Wait()
 {
     CommonUtility.RunWithoutSynchronizationContext(() => ((Task)this.internalAsyncResult).Wait());
 }
Exemplo n.º 2
0
 /// <summary>
 /// Checks that the given timeout in within allowed bounds.
 /// </summary>
 /// <param name="timeout">The timeout to check.</param>
 /// <exception cref="ArgumentOutOfRangeException">The timeout is not within allowed bounds.</exception>
 internal static void CheckTimeoutBounds(TimeSpan timeout)
 {
     CommonUtility.AssertInBounds("Timeout", timeout, TimeSpan.FromSeconds(1), Constants.MaximumAllowedTimeout);
 }
Exemplo n.º 3
0
 public AsyncSemaphoreAsync(int initialCount)
 {
     CommonUtility.AssertInBounds("initialCount", initialCount, 0, int.MaxValue);
     this.count = initialCount;
 }