[Twisted-Python] wxpython, threadselectreactor and thread

Shawn Church Sl_Church at sbcglobal.net
Mon May 30 12:22:25 EDT 2005



Itamar Shtull-Trauring wrote:

>On Mon, 2005-05-30 at 14:35 +0200, Michele Petrazzo wrote:
>
>  
>
>>3) Why into your demo the reactor.stop() work and into my code I receive
>>this error:
>>RuntimeError: can't stop reactor that isn't running
>>I use the same code initialization of the demo.
>>    
>>
>
>You are not calling reactor.run() anywhere, as far as I can tell.
>
>
>  
>
My understanding is you call reactor.interleave **NOT** reactor.run with
threadedselectreactor.   For wx I use reactor.interleave(wx.CallAfter)
in my App.OnInit method and it works fine. There IS an issue with the wx
MainLoop not exiting when my last frame is closed (I think this is
because wx still "sees" the reactor thread) so I use wx.GetApp().Exit()
to terminate the wx MainLoop manually.


Shawn Church
http://SChurchComputers.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20050530/3c39692a/attachment.htm 


More information about the Twisted-Python mailing list