Home > Software design >  At least, how many threads are needed to run an async task?
At least, how many threads are needed to run an async task?

Time:07-30

This was an interview question asked by a senior manager.

At least, how many threads are needed to run an async task?

I said that at least one thread is needed, but I'm not sure if I said it right or not.

Any ideas?

CodePudding user response:

From 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.

You gave the correct answer.

  • Related