Ejemplo n.º 1
0
            public static void CreateWithTimeout(WaitHandle waitHandle, TaskCompletionSource <bool> taskCompletionSource, int millisecondsTimeout)
            {
                var result = new WaitHandleTaskCompletionSourceManager(waitHandle, taskCompletionSource);

                // ReSharper disable once MethodSupportsCancellation
                Task.Run(() => result.CallbackWithTimeout(millisecondsTimeout));
            }
Ejemplo n.º 2
0
            public static void CreateWithTimeout(WaitHandle waitHandle, TaskCompletionSource <bool> taskCompletionSource, int millisecondsTimeout)
            {
                var result = new WaitHandleTaskCompletionSourceManager(waitHandle, taskCompletionSource);

                Task.Run(() => result.CallbackWithTimeout(millisecondsTimeout));
            }