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?
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/ZJOHPP4XNPLNMKPDB2COJ7XHNT755LOW/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to