!47 Task,加注释

Merge pull request !47 from zzgzzgok/dev-blazor
This commit is contained in:
Argo 2019-11-26 13:38:11 +08:00 committed by Gitee
commit 030cd53eb5
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ namespace Microsoft.Extensions.DependencyInjection
// 本机调试时此处会抛出异常,配置文件中默认开启了任务持久化到物理文件,此处异常只有首次加载时会抛出
// 此处异常是示例自定义任务内部未进行捕获异常时任务仍然能继续运行,不会导致整个进程崩溃退出
// 此处代码可注释掉
TaskServicesManager.GetOrAdd("故障任务", token => throw new Exception("故障任务"));
//TaskServicesManager.GetOrAdd("故障任务", token => throw new Exception("故障任务"));
TaskServicesManager.GetOrAdd("取消任务", token => Task.Delay(1000)).Triggers.First().Enabled = false;
// 创建任务并禁用