Answer the question
In order to leave comments, you need to log in
How does the OS understand which thread the data is for?
Thread A sent a request to the database, the OS switched to thread B, but then data arrived from thread A. Where is it stored and how does the OS understand that it needs to be given to thread A?
What happens to Go-routines in the same case. As I understand it, each go-routine can also send a request to the database, then transfer control to another. What mechanism of data destruction is implemented?
Answer the question
In order to leave comments, you need to log in
I think this article tells you what you need.
https://habrahabr.ru/company/ua-hosting/blog/269271/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question