Hi, Glyph Lefkowitz:
On Wed, 13 Nov 2002 21:19:59 +0100, "Matthias Urlichs"
wrote: Nobody seems to have used twisted.python.threadable.ThreadAttr recently..:
Wow. If it's _that_ rarely used, maybe the right thing to do is just to trash it. Would this code be useful to you if it worked?
Personally, I woudn't need it. IMHO: if you use threads in Twisted, you do it via the thread pool. That doesn't mesh at all with ThreadAttr. State is usually carried in objects or procedure arguments, which don't need global storage anyway. I find myself more in immediate need of a queueing mechanism; the quick-and-dirty solution seems to be to fork off two threads and to use a bounded Python Queue. However, the continuous switching between the reader (which blocks on the queue, therefore needs to be in its own thread) and Twisted's main thread (which writes to the process-or-whatever that's going to eventually consume the data) seems rather sub-optimal for performance. :-/ -- Matthias Urlichs | noris network AG | http://smurf.noris.de/