On 02:21 pm, gabriel.rosse...@arimaz.com wrote: >Hello everyone, > >I am using wx with twisted and pubsub (not the on in wx but the >independent one) to notify each one of what is going on. I was >wondering >if I should use reactor.callFromThread to call publisher.sendMessage or >not? I haven't been doing that until now but I wondered if it was >better to.
Use reactor.callFromThread if you have code running in a non-reactor thread and you want it to initiate some action in the reactor thread. So, if publisher.sendMessage is using Twisted APIs or otherwise requires that it be run only in the reactor thread, and you need to use it from a non-reactor thread, then use reactor.callFromThread. Otherwise, don't. Jean-Paul _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python