Last post Feb 22, 2017 12:16 PM by PatriceSc
Feb 22, 2017 09:41 AM|mamoni.kol2017|LINK
often we use Async and Await to run long running operation but i do not know does it spawn new thread ?
please let me know.
Feb 22, 2017 12:16 PM|PatriceSc|LINK
AFAIK it's basically unrelated. For IO related operations it should use an OS feature called "IO completion ports". Think of this as an "interface". You have the "contract" which is that you can await for this operation (hopefully efficiently). Now the implementation
uses whatever best fit for doing that maybe using threads in some cases but not necessarily.
If you have a particular problem, it might be best to discuss directly that If the operation is really long and/or frequent, you may still have better approach (queuing that to separate server(s) so that you can scale by just adding additional server(s) ?)