Fork me on GitHub
#core-async
<
2017-07-15
>
lwhorton19:07:42

hey guys, on thinking about using core.async for a service I’m curious about the infectiousness of channels. is there a way to prevent the spread of go blocks into consumers of my service? is it a simple as

(service/do-something-async :val then-callback)
where the service eventually just pulls a result from a channel, then invokes the then-callback of the consumer?

lwhorton19:07:49

or is this a case where you just have to pick a concurrency model and run with it?

noisesmith19:07:16

there's more options in jvm clojure - you can use things like put! and <!! etc.

lwhorton19:07:15

ah, that’s right I forgot there’s no blocking in cljs. so at worst consumers would just know that the service works with csp and they should <!!. i suppose that’s a little better than a callback, at least for readability

tbaldridge20:07:36

@lwhorton my talk at the last Clojure/West was on that subject: https://www.youtube.com/watch?v=096pIlA3GDo

lwhorton23:07:45

thanks @tbaldridge ill take a look