Exemplo n.º 1
0
        public ICancellable Enqueue(Action <CancellationToken> action, TaskPriority priority)
        {
            var t = new StandingTask();

            Run(action, t);
            return(t);
        }
Exemplo n.º 2
0
        private static async void Run(Action <CancellationToken> action, StandingTask t)
        {
            await Task.Delay(10).ConfigureAwait(false);

            t.IsRunning = true;
            action.Invoke(default);