Ejemplo n.º 1
0
        async static Task p606_LaunchFoo_and_TimedCancel()
        {
            var token = new MyCancellationToken();

            var tskConti = Task.Delay(2000).ContinueWith(ant =>
                                                         token.Cancel()
                                                         ); // Tell it to cancel in two seconds.

            await p606_FooAsync(token);
        }