//7 超时等待一个特定任务,然后中止所有任务 static async Task Worker7() { generator.children children = new generator.children(); var A = children.tgo(() => Worker("A", 1000)); var B = children.tgo(() => Worker("B", 2000)); if (await children.timed_wait(1500, A)) { Log("成功"); } else { Log("超时"); } await children.stop(); }