[Twisted-Python] client connecting to 2 servers (nonsimultaneously)

Jason Rennie jrennie at gmail.com
Wed Jan 12 10:52:05 EST 2011


Benjamin, sorry for providing you with an incorrect explanation.  Jean-Paul,
thank you for correcting my broken understanding of callWhenRunning.

Is there a call which puts a function into the reactor's queue of tasks to
be completed?

Thanks,

Jason

On Wed, Jan 12, 2011 at 10:26 AM, <exarkun at twistedmatrix.com> wrote:

> Although note that if the reactor is already running when you
> instantiate the factory, then callWhenRunning will immediately call the
> function you pass to it, as demonstrated by this transcript in which the
> reactor is already running:
>
>    >>> def foo():
>    ...     print 'foo running'
>    ...    >>> from twisted.internet import reactor
>    >>> reactor.callWhenRunning(foo)
>    foo running
>    >>>
> Jean-Paul
>
>
-- 
Jason Rennie
Research Scientist, ITA Software
617-714-2645
http://www.itasoftware.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20110112/45f97e25/attachment.htm 


More information about the Twisted-Python mailing list