channel or message queue in asyncio

Functionalities are similar to Go channel but with topics or consumers like a message queue. Possible syntax: ```python async def main(): ch = Channel() await ch.put(1) # put await ch.get() # get await ch.close() # close c1 = ch.consumer() c2 = ch.consumer() async for data in c1: # two consumer are indpendent ... async for data in c2: # async for syntax ... ``` Related project: https://github.com/Drakkar-Software/Async-Channel https://github.com/tbug/aiochannel https://github.com/ebb29c/asyncio-channel https://github.com/navytux/pygolang Though it can be implemented by using asyncio.Queue,If this can be added into the asyncio library?

Sound like a good idea. Would be supernice if the channel could receive (ch.get()) multiple types of events like: network messages (socket), UI input (mouse and keyboard events), file events (select?), timeouts, kernel events (shutdown) and signals besides internal messages (ch.put) br /Rene

Sound like a good idea. Would be supernice if the channel could receive (ch.get()) multiple types of events like: network messages (socket), UI input (mouse and keyboard events), file events (select?), timeouts, kernel events (shutdown) and signals besides internal messages (ch.put) br /Rene
participants (2)
-
Rene Nejsum
-
zhongquan789@gmail.com