我试图使一些简单的纤维工作,但似乎不像预期的那样。我在这里错过了什么?以前从未与纤维一起工作过
我期望的产出:
iteration: 0
Fiber 1 is working!
Fiber 2 is working!
Fiber 3 is working (0)!
(1 sec sleep)
iteration: 1
Fiber 1 is working!
Fiber 2 is working!
Fiber 3 is working (1)!
(1 sec sleep)
iteration: 2
Fiber 1 is working!
Fiber 2 is working!
Fib