B
B
beduin012016-12-10 11:59:31
go
beduin01, 2016-12-10 11:59:31

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

1 answer(s)
E
Evgeniy Ivakha, 2016-12-15
@ivahaev

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 question

Ask a Question

731 491 924 answers to any question