[Twisted-Python] reset/restart reactor problem

Jean-Paul Calderone exarkun at divmod.com
Sun Jun 25 10:12:37 EDT 2006


On Sun, 25 Jun 2006 12:39:16 +0100, Moof <moof at metamoof.net> wrote:
>> >I am porting an academic middleware project, currently implemented in  C++
>> >and Java, to python. It extensively uses multicast for  communicating
>> >general events and TCP to communicate with a database.  The multicast
>> >messages that I send out depend on the results that I  first obtain from 
>>the
>> >database. I would prefer to serialise each of  these requests in turn, but
>> >its not immediately obvious to me what  the best way to do this using
>> >Twisted is.
>>
>>There are quite a few possible techniques to apply here.  One I would
>>recommend is to keep a list of objects which represent pending tasks
>>which need to be executed serially.  When each task completes, pop the
>>next one from the list and begin processing it.  When a new task needs
>>to be performed, push it onto the list.
>
>[snip code]
>
>This has already been implemented in twisted.

I know.  I implemented it. ;)

Jean-Paul




More information about the Twisted-Python mailing list