clj-rethinkdb
clj-rethinkdb copied to clipboard
Providing a Manifold stream as another async option
trafficstars
I've been looking at Manifold, and wondering if it would suit our application's async model better than core.async. What are your thoughts on presenting a Manifold stream as another API option? Perhaps instead of :async? true, you could provide :async? :core-async, or :async? :manifold, with a fallback that :async? true is treated as :core-async. I'm happy to look at this if this idea sounds good.
Sure. We just have to return the stream directly instead of connecting it to a channel as is done right now:
(let [result-chan (async/chan)]
(s/connect stream result-chan)
result-chan)