by xaritas · 13y ago · 0 comments
They both block the thread and any other go-blocks that happen to be mapped to it. I think you get 2 x NUM_CPU threads in the dedicated pool for channels, so either of these is a mistake. (Aside: I'm not sure why you were down voted for saying this.)
When you need to wait inside of a go-block, the correct way is to use (timeout millis), which creates and then closes a channel.
This has some nice examples: https://github.com/clojure/core.async/blob/master/examples/w...
No comments yet.