Hey,
V8 ships with async iterators - I was wondering if they should be used for channels as they provide a bi-directional pull stream and have very nice for... await syntax for messages :)
This also comes with all the debugging benefits of being a built-in and a standard between browsers, Node.js and other environments.
@benjamingr I love async iterators, but I think for the low-level pub/sub API I'll stick with the current interface for now. async iterators will definitely come in useful for high-level APIs - like reading data from a socket.
@ry cool, if the reason is performance then I'm having a session with V8 tomorrow about promise-related performance and would be happy to bring it up.
Most helpful comment
@benjamingr I love async iterators, but I think for the low-level pub/sub API I'll stick with the current interface for now. async iterators will definitely come in useful for high-level APIs - like reading data from a socket.