[Twisted-Python] threadable.init() operation
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. I'm asking this question beacuse adbapi isn't quite what I need and before I go hacking around I was trying to get a firmer grip on thread <-> event loop communication. Best, Clark
On Mon, 3 Mar 2003 18:17:48 +0000
"Clark C. Evans"
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/ <***
participants (2)
-
Clark C. Evans
-
Itamar Shtull-Trauring