@T.Zacks ,Welcome to Microsoft Q&A,
i saw some one is saying ConfigureAwait(false) is allow to run code on thread pool thread instead of current thread. is it true?
Yes, ConfigureAwait(false) is allow to run code on thread pool thread. Whether to generate a thread pool depends on ifr you use continuation. If the first task you call ConfigureAwait on has already completed, the code will continue to execute synchronously, otherwise it will generate the new thread from the thread-pool.
Please refer to the answer from the stackoverflow, which also has a code example to explain it.
when to use ConfigureAwait(false) ? and when to use ConfigureAwait(true) ?
The following blog answers your question.
https://devblogs.microsoft.com/dotnet/configureawait-faq/
Best Regards,
Jack
If the answer is the right solution, please click "Accept Answer" and upvote it.If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.