Re: [Twisted-Python] Reactor callback from the wrong thread

2009-06-02 Thread Drew Smathers
On Fri, May 29, 2009 at 3:02 AM, Lars Ivar Igesund wrote: > Thanks for the tip, > > however - in which version was blockingCallFromThread added? It did > not wish to be imported from the version I installed via Ubuntu which > appears to be 2.5.0. (Bit confused about the version numbering though >

Re: [Twisted-Python] Reactor callback from the wrong thread

2009-05-29 Thread Itamar Shtull-Trauring
On Fri, 2009-05-29 at 09:02 +0200, Lars Ivar Igesund wrote: > Thanks for the tip, > > however - in which version was blockingCallFromThread added? Post-2.5.0 apparently. I suggest at least reading the code so you can see how it works. ___ Twisted-Pyt

Re: [Twisted-Python] Reactor callback from the wrong thread

2009-05-29 Thread Lars Ivar Igesund
Thanks for the tip, however - in which version was blockingCallFromThread added? It did not wish to be imported from the version I installed via Ubuntu which appears to be 2.5.0. (Bit confused about the version numbering though since Twisted appears to be at something like 8.2) Best, Lars Ivar O

Re: [Twisted-Python] Reactor callback from the wrong thread

2009-05-28 Thread Itamar Shtull-Trauring
On Thu, 2009-05-28 at 14:04 +0200, Lars Ivar Igesund wrote: > If anyone has a good advice, then I'd appreciate it. You can call any reactor API from another thread using reactor.callFromThread, or the more useful twisted.internet.threads.blockingCallFromThread. So just wrap all places that call i

Re: [Twisted-Python] Reactor callback from the wrong thread

2009-05-28 Thread Lars Ivar Igesund
Hi, thanks for the reply. On Wed, May 27, 2009 at 5:43 PM, Jean-Paul Calderone wrote: > On Wed, 27 May 2009 15:08:49 +0200, Lars Ivar Igesund > wrote: >>Hi! >> >>I have an issue where the reactor calls the callback from a different >>thread than the one the reactor is running in. > > Generally

Re: [Twisted-Python] Reactor callback from the wrong thread

2009-05-27 Thread Jean-Paul Calderone
On Wed, 27 May 2009 15:08:49 +0200, Lars Ivar Igesund wrote: >Hi! > >I have an issue where the reactor calls the callback from a different >thread than the one the reactor is running in. Generally speaking, the only callbacks the reactor invokes are protocol methods (like dataReceived and connect

[Twisted-Python] Reactor callback from the wrong thread

2009-05-27 Thread Lars Ivar Igesund
Hi! I have an issue where the reactor calls the callback from a different thread than the one the reactor is running in. The usecase is as follows; We are running tests using PyFit (Fitnesse), and where some of the tests depends on receiving SNMP traps in the background. So at the start we start