[Twisted-Python] [ANN] thimble 0.1.0

Laurens Van Houtven _ at lvh.io
Sat May 17 07:53:06 MDT 2014


Hi everyone!


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).

(It's a thimble because it lets you play with threads without pricking
yourself :-))

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.

The README should run you through it real quick:
https://pypi.python.org/pypi/thimble

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 :-)

Thanks to Rackspace for letting me write it open source & on company time
:-)

hth
lvh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://twistedmatrix.com/pipermail/twisted-python/attachments/20140517/6fb01638/attachment.html>


More information about the Twisted-Python mailing list