title: What is so bad with threadlocals
body: <p>Everybody in Django world seems to hate threadlocals(<a href="http://code.djangoproject.com/ticket/4280" rel="noreferrer">http://code.djangoproject.com/ticket/4280</a>, <a href="http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser" rel="noreferrer">http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser</a>). I read Armin's essay on this(<a href="http://lucumr.pocoo.org/2006/7/10/why-i-cant-stand-threadlocal-and-others" rel="noreferrer">http://lucumr.pocoo.org/2006/7/10/why-i-cant-stand-threadlocal-and-others</a>), but most of it hinges on threadlocals is bad because it is inelegant. </p>
  
  <p>I have a scenario where theadlocals will make things significantly easier. (I have a app where people will have subdomains, so all the models need to have access to the current subdomain, and passing them from requests is not worth it, if the only problem with threadlocals is that they are inelegant, or make for brittle code.)</p>
  
  <p>Also a lot of Java frameworks seem to be using threadlocals a lot, so how is their case different from Python/Django 's?</p>