[Twisted-Python] spawning tasks after reactor?

Darren Govoni darren at ontrenet.com
Wed Dec 31 07:37:26 MST 2008


Hi,
  I'm new to twisted and have a simple question. I want to run a
threaded server that monitors a remote service and spawns
queued/threaded tasks as it finds messages.

I'm having trouble understanding how to do this after a reactor is
running since the tasks are not set up before reactor.run(). I see
reactor.callLater(). But I want to spawn the task immediately.

I tried:

reactor.callLater(0,self.some_method,object)

but the method is not immediately invoked. It seems its not invoked at
all.

I want to create a high-performance threaded scheduler using twist. Any
tips?

thank you!
Darren





More information about the Twisted-Python mailing list