3 ms·
java.util.concurrent doesn't have a convenient mechanism for "selecting" across available channels/queues without blocking. This is a key feature of erlang and
by kinofcain 13y ago
java.util.concurrent doesn't have a convenient mechanism for "selecting" across available channels/queues without blocking. This is a key feature of erlang and go. There are ways to simulate it, but it's not the same thing. (I'd love to be wrong about this).
- pjmlp 13y agoYes, you need to peek() the queues, so it is not really being blocked on select like Go. But then, one can use something like Akka, which I forgot to mention, and still be on the JVM.
- voidlogic 13y ago>so it is not really being blocked on select like Go. Select in Go only blocks if you don't feel out the "default:" case... select { case: foo := <-fooCh fmt.Printf("got %v\n", foo) default: fmt.Println("got nothing") }