public static async Task<int> CalcAsync(int wait, int shit)
{
await Task.Run(() => Thread.Sleep(wait));
return shit;
}
public static async void TestDoubleTask()
{
Task<int> t1 = CalcAsync(1000, 1); // t1 开始运行
Task<
C# 同时运行多个 Task
最新推荐文章于 2023-06-13 17:15:30 发布