Closed glittershark closed 9 years ago
Hi Griffin,
I'd suggest that the correct (+ idiomatic) way of doing this is just to use the current Carmine callback mechanism to put!
vals to your own core.async channel. I.e. your callback handler will just shuttle vals into your own core.async channel.
Advantages of this approach:
So regular old callbacks turn out to be the right tool for the job here IMO. Plugging them into your own core.async (or alternative) system to coordinate higher-level data flow is super easy if that's what you want (I often do).
Does that make sense? :-)
yeah, I'm totally with you on that - always good to keep OSS libs as generic, distinct, and isolated as possible. Thanks for the thorough, well thought-out response! Several :+1: for you. :grinning:
No problem, cheers :-)
I don't know if this isn't generic enough for carmine, but now that I'm up and running I've been thinking about how cool it would be to have an option, arity, whatever to
subscribe
andpsubscribe
to make them return a core.async channel that could betake!
n from. Thoughts?