Exemple #1
0
        async Task JobHandle.Cancel()
        {
            _jobContext.Cancel();

            try
            {
                await _task.OrTimeout(TimeSpan.FromSeconds(30)).ConfigureAwait(false);
            }
            catch (TaskCanceledException)
            {
            }
            catch (OperationCanceledException)
            {
            }
        }
Exemple #2
0
        Task JobHandle.Cancel()
        {
            _jobContext.Cancel();

            return(TaskUtil.Completed);
        }