Fork me on GitHub
#core-async
<
2017-04-19
>
Yehonathan Sharvit12:04:58

Hi, about core.async/thread: is the code running in a core.async thread or a JVM thread?

dominicm12:04:24

@viebel it runs in a thread pool (JVM thread)

Yehonathan Sharvit14:04:12

Is there a way to subscribe to all the topics of a pub

noisesmith15:04:55

@viebel interesting question - if I was doing that I would make a mult then create two tap instances of the mult, one of which becomes the pub the other you listen to directly - but I'm not sure that's the simplest answer (it would work though)

Yehonathan Sharvit15:04:42

If there is no simple way to do it in core.async, there is probably a good reason

noisesmith15:04:45

right, I assume there's something simpler

noisesmith15:04:06

really what you want is both fan out and fan in, but it's simpler to capture the messages before the fan out and use that as your fan-in

noisesmith15:04:43

I'd disagree regarding "probably a good reason". These are conveniences and none of the operations describe contradict good core.async usage.

noisesmith15:04:22

I'd welcome an explanation of why I'm wrong though - not an expert on this aspect of core.async, just trying to help as much as I can.

dergutemoritz18:04:06

That's the best way to do it I'd say

dergutemoritz18:04:37

Also, I would argue that this is indeed simple in the sense of composing complex behavior from simple parts 🙂

yenda18:04:05

Fuuny that is exactly what I wanted to do today and I opted for the mult/pub solution