这是一位高级经理提出的面试问题。
运行一个异步任务至少需要多少个线程?
我说过至少需要一个线程,但我不确定我说得对不对。
有什么想法吗?
最佳答案
来自Microsoft :
Async methods don't require multithreading because an async method doesn't run on its own thread. The method runs on the current synchronization context and uses time on the thread only when the method is active.
您给出了正确答案。
关于c# - 运行一个异步任务至少需要多少个线程?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73158242/