[Twisted-Python] threadable.init() operation

Itamar Shtull-Trauring twisted at itamarst.org
Tue Mar 4 12:40:22 EST 2003

On Mon, 3 Mar 2003 18:17:48 +0000
"Clark C. Evans" <cce at clarkevans.com> wrote:

> I've read the threading/enterprise howtos and am still
> trying to grok thread <-> event loop communication.  In
> particular, I'm curious what exactly what threadable.init()
> does.  I was expecting something rather simple, which 
> implementes communcation between the main event pump and
> each thread (callInThread, callFromThread).  However, this
> code seems to be doing much more than that, and I don't
> quite understand what it is doing or why.  A bit of a 
> primer would be great.

All it really does it turn on all the threading support (e.g. locks and
whatever else modules have to set up to deal with threads and
thread-safety issues). The idea is that if you don't use threading you
shouldn't need to pay the price for locking.

Itamar Shtull-Trauring    http://itamarst.org/
http://www.zoteca.com -- Python & Twisted consulting
***> Stop the war: http://unitedforpeace.org/ <***

More information about the Twisted-Python mailing list