03 2022 档案
摘要:开局一张图,故事慢慢编!这是一个后台任务打印时间的德莫,代码如下: using BackGroundTask; var builder = WebApplication.CreateBuilder(); builder.Services.AddTransient<TickerService>();
阅读全文
摘要:经常听到说线程池这个东西,凭印象写了个这么简单的例子。 CusTRun方法要不要await,取决于要不要作为后台任务。任务可指定数量,线程参数可共享全,顺序可控,可继续改进。 using System; using System.Collections.Concurrent; using Syste
阅读全文