Fork me on GitHub
#core-async
<
2019-10-10
>
jumar07:10:50

I'd add to the yesterday's discussion that it might not be the best idea to use a/thread but instead use your own thread pool of limited size. So you don't end up spawning one thread for each go block/process.

noisesmith16:10:18

threads are cheap, it's context-switches that are expensive, it's more important to make sure significant work happens in the thread (so the amortized cost of the context switch is lower) in most cases

noisesmith16:10:35

but as said elsewhere, it depends

jumar20:10:24

Sure, it depends. But you can create 10,000 go blocks easily but it's probably a bad idea to spawn a new thread immediately for each of them

hiredman16:10:14

(that was wildly inaccurate)

hiredman16:10:46

but I am going to stand by it depends