title: What resources do blocked threads take-up
body: <p>One of the main purposes of writing code in the asynchronous programming model (more specifically - using callbacks instead of blocking the thread) is to minimize the number of blocking threads in the system.</p>
  
  <p>For running threads , this goal is obvious, because of context switches and synchronization costs.</p>
  
  <p>But what about blocked threads? why is it so important to reduce their number?</p>
  
  <p>For example, when waiting for a response from a web server a thread is blocked and doesn't take-up any CPU time and does not participate in any context switch.</p>
  
  <p>So my question is:
  other than RAM (about 1MB per thread ?) What other resources do blocked threads take-up?</p>
  
  <p>And another more subjective question:
  In what cases will this cost really justify the hassle of writing asynchronous code (the price could be, for example, splitting your nice coherent method to lots of beginXXX and EndXXX methods, and moving parameters and local variables to be class fields).</p>
  
  <p>UPDATE - additional reasons I didn't mention or didn't give enough weight to:</p>
  
  <ol>
  <li><p>More threads means more locking on communal resources</p></li>
  <li><p>More threads means more creation and disposing of threads which is expensive</p></li>
  <li><p>The system can definitely run-out of threads/RAM and then stop servicing clients (in a web server scenario this can actually bring down the service)</p></li>
  </ol>