Fork me on GitHub
#core-async
<
2017-09-04
>
didibus19:09:58

@noisesmith Right, I forgot channel are mostly wrappers around BlockingQueues. But how would I control the pool of threads? If I use async/thread that always creates a new thread correct? Can I have it use a pool?

noisesmith19:09:58

the simple way to do this is to always do a park on the result of your thread

noisesmith19:09:46

that way you never have more threads than you have running go blocks, and it's pretty straightforward to control the number of go blocks running (eg. start N go-loops in a doseq, all reading from the same channel to get tasks)