title: What happens to the data that will be returned when thread is waiting for other threads
body: <p>Let's say I create many many threads on one core CPU. Each thread does IO operation, for example it reads data from a database or other microservice.
  What happens if I create thousands of threads that read something from a DB?</p>
  
  <p>How this communication works?</p>
  
  <p>I assume that in a thread we send some request to a DB or some HTTP call to other service. After that CPU is used by another thread. How is this communcation handled? Does the OS handle messages for other threads and waits until these threads will be used by CPU to pass them data?</p>
  
  <p>Lets say I make 1000 calls in 1000 of threads and each response will be 1MB of data. Where is this data buffored until correct thread become active? (For example we are spawning tenth thread and already got a response fot the first one)</p>
  
  <p>Or maybe someone could pass some nice articles about this topic?</p>