<div dir="ltr"><div><div>Hi everyone!<br><br><br></div>thimble is a library that makes it easy to wrap blocking objects with a thread pool to give you an async API. In particular, it lets you selectively wrap blocking methods, and takes an explicit reactor and thread pool, making it at least slightly harder to do the obvious but potentially bad thing and tricky to test thing (global reactor state, using the reactor thread pool). <br>

<br></div><div>(It's a thimble because it lets you play with threads without pricking yourself :-))<br></div><div><br></div><div>This is a small library: it doesn't really fix any big engineering problems, and that's okay. It just removes a bunch of boilerplate I've seen in many a Twisted software project, usually boilerplate that's implemented using the suboptimal methods described above.<br>

</div><div><br></div><div>The README should run you through it real quick: <a href="https://pypi.python.org/pypi/thimble">https://pypi.python.org/pypi/thimble</a><br></div><div><br></div><div>This is just an early release. I expect that the documentation isn't good enough to get best practices out the door, particularly in setting up thread pools. I think it's pretty decent and probably already worth a look, though :-)<br>

<br>Thanks to Rackspace for letting me write it open source & on company time :-)<br><br></div>hth<br>lvh<br><br></div>