Paul Moore wrote: > Also, can I run > the produce/consume just by calling produce()? My impression is that > with asyncio I need an event loop - which "traditional" coroutines > don't need. The Pythonic way to do things like that is to write the producer as a generator, and the consumer as a loop that iterates over it. Or the consumer as a generator, and the producer as a loop that send()s things into it. To do it symmetrically, you would need to write them both as generators (or async def functions or whatever) plus a mini event loop to tie the two together. -- Greg
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4