[Twisted-Python] Twisted with wxPython in a thread

Stephen Waterbury stephen.c.waterbury at nasa.gov
Tue Aug 24 08:08:49 MDT 2010


On 08/24/2010 09:24 AM, Stephen Waterbury wrote:
> On 08/24/2010 09:22 AM, Gabriel Rossetti wrote:
>> Ok, so you put Twisted in a thread? I read in several posts that this
>> posed problems, have you had any drawbacks?
>
> I haven't observed any.

Reflecting on this a little further (and with the caveat that I
am a complete ignoramus on threading), it seems to me that
problems happen when Twisted is not in the main thread.  Note
that in the example, the reactor starts first (i.e., before the
wx event loop), so I guess it is in the main thread ... I haven't
tried switching them, but if you do that or anything that breaks
this method, please let me know -- as I say, I haven't seen it
break (freeze or otherwise malfunction) yet.

Steve




More information about the Twisted-Python mailing list