4 ms·
Asyncio sounds promising, does anyone with more knowledge know whether it comes close to Go channels? Go channels are the only experience I have with concurren
by gnur 13y ago
Asyncio sounds promising, does anyone with more knowledge know whether it comes close to Go channels?
Go channels are the only experience I have with concurrent programming, but when I understood them it quickly became second nature to create everything using channels. Can techniques like websockets be used now as cleanly as in Go?
- DanWaterworth 13y agoI've been using asyncio in the last week. I've found it remarkable clean and intuitive. It's difficult to compare to channels in go, because it's such a different solution to the same problem - that of structuring concurrent programs.
- babarock 13y agoIf anyone's interested in testing out Asyncio/Tulip on Python 2, here's a mostly-compatible backport: https://pypi.python.org/pypi/trollius/ https://pypi.python.org/pypi/trollius/
- dalke 13y agoThey aren't like channels. If you want something like channels, try out greenlets for CPython, Stackless Python (a modified version of CPython) or pypy.
- nostrademons 13y agoI suspect that you could easily implement channels on top of asyncio - goroutines = coroutines, hide the yield-from inside 'send', select = asyncio.wait(return_when=FIRST_COMPLETED).