Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
参考答案:https ://stackoverflow.com/a/4047607/347172
基本上,由于编译器正在创建一个使用递归的状态机,是否有可能一个具有“太多”await的类会导致编译器生成会抛出异常的代码?
await
不是你想的那样。编译器创建一个状态机,它会自行调度,而不是调用自己。调度会创建一个重置堆栈的“蹦床”。