Fork me on GitHub
#core-async
<
2018-04-22
>
lxsameer17:04:46

Hey folks, How does core.async handle parallel execution of go blocks ?

Alex Miller (Clojure team)20:04:00

With threads, but I suspect that’s not very helpful. Is there a deeper question?

lxsameer21:04:48

Yeah, As far as i understand core async creates a thread pool with small number of threads

lxsameer21:04:08

and it parses each go block to some blocks

lxsameer21:04:30

and run the blocks on that thread pool

lxsameer21:04:41

but i don't know how and when

lxsameer21:04:59

what if the block contain some blocking operation ?

lxsameer21:04:34

does core async follows the classic approach of having several thread pools for different purposes ? like blocking thread pool and computing thread pool ?

mfikes22:04:50

@lxsameer Looking at the code, I only see two pools. One corresponds to the documentation "go blocks are dispatched over an internal thread pool" and another corresponds to clojure.core.async/thread.

lxsameer22:04:34

@mfikes so it would be easy to starve in the only thread pool by using to many blocking IO in a go block right ?