[Twisted-Python] concurrency via reactor
exarkun at divmod.com
Wed Sep 24 13:19:40 MDT 2008
On Wed, 24 Sep 2008 12:16:29 -0700, Vadim Zaliva <krokodil at gmail.com> wrote:
>I am writing some code which requires synchronization between several
>TCP clients. I have several connections and at some point I have to
>wait for data becoming availiable from several of them. Kind of
>"barrier" pattern. I am twising my head how to do it with twisted
>using reactor. Could somebody point me into right direction? Thanks!
You might want twisted.internet.defer.gatherResults(). It accepts a
list of Deferreds and returns a Deferred that fires when they all fire.
More information about the Twisted-Python