Does .NET resume an await continuation on a new different thread pool thread or reuse the thread from a previous resumption?
Let\'s image below C# code in a .NET Core co
Does .NET resume an await continuation on a new different thread pool thread or reuse the thread from a previous resumption?
Most of the time it will use the same thread, but this is not guaranteed. This answer to a question where the OP wants to force it to the same thread gives some details.
Where the continuation is run is up to the TaskScheduler. I haven't looked, but I imagine it will run the continuation on the same thread just to avoid unnecessary overhead when working with the thread pool.
Is there any possibility each continuation will resume on a different thread pool thread like below?
Yes, there's a possibility, but probable that you won't see this, again because of the scheduler. You'd probably have to write your own to force a difference, and personally I don't know why you'd do that. (Not saying that was your intent).