clj-rethinkdb icon indicating copy to clipboard operation
clj-rethinkdb copied to clipboard

Providing a Manifold stream as another async option

Open danielcompton opened this issue 9 years ago • 1 comments
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.

danielcompton avatar May 14 '16 21:05 danielcompton

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)

apa512 avatar May 14 '16 22:05 apa512