3 ms·
Does anyone know if Java virtual threads will also have channels and a select concept, like in Go?
by logicchains 3y ago
Does anyone know if Java virtual threads will also have channels and a select concept, like in Go?
- aardvark179 3y agoI think at some point yes. We certainly discussed it but it’s one of those things that takes time to really get right and performant.
- kaba0 3y agoJava already has many more concurrent and parallel data structures, so while it likely won’t have a keyword, it can definitely do it already.
- shaunxcode 3y agoJust spit balling but you should be able to use clojure core async channels and the blocking put/take/alts functions. Would probably take a small amount of work to expose those things to Java in an idiomatic way but should be doable. Please take all of that with a giant grain of salt though!