Re: [python-tulip] Pattern for recurring events in coroutines?

2016-01-03 Thread Guido van Rossum
Hi Robie, This all looks very well put together; I don't see any obvious shortcuts in your code. I was at first tempted to recommend using the asyncio.Queue class, but it seems you really want to be able to have multiple consumers of the same stream of events. I notice that your Event* classes do

[python-tulip] Pattern for recurring events in coroutines?

2015-12-29 Thread Robie Basak
Hi, Futures are really nice for one-off events, in that I can just arbitrarily "yield from" or "await" a future in the middle of a coroutine. Is there an pattern to do something similar for recurring similar events? The closest pattern of which I'm aware is a class with callbacks for each type o