apa512 / clj-rethinkdb

Eclipse Public License 1.0
205 stars 42 forks source link

Providing a Manifold stream as another async option #162

Open danielcompton opened 8 years ago

danielcompton commented 8 years ago

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.

apa512 commented 8 years ago

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)