News for hackers. Stuff that matters.
Re:Achieving 5M persistent connections with Project Loom vir... by imranhou on Saturday April 30, 2022 @12:14PM (#31217066)
It looks more closer to go routines, which to me begs the question - where are the channels that I could use to communicate between these virtual threads?
Re:Achieving 5M persistent connections with Project Loom vir... by adra on Saturday April 30, 2022 @12:42PM (#31217263)
Go's channels are simplistically a mutex in front of a queue. Java has many existing objects that can do the same, it's just that's not idiomatic best choice to do the same. Since green threads should wake up from Object.notify(), any threads blocking on the monitor should wake/consume. I'm curious how scalable/performance a green thread ConcurrentDequeue would stand up to go's channel.
Re:Achieving 5M persistent connections with Project Loom vir... by Matthias247 on Saturday April 30, 2022 @12:52PM (#31217338)
You are right. But Go Channels come also with the superpower of „select“, which allows to wait for multiple objects to become ready and atomic execution of actions. I don’t think this part can be retrofitted on top of simple BlockingQueues.
Re:Achieving 5M persistent connections with Project Loom vir... by sdfgdfgbsdfg on Saturday April 30, 2022 @01:00PM (#31217390)
Re:Achieving 5M persistent connections with Project Loom vir... by sdfgdfgbsdfg on Saturday April 30, 2022 @12:31PM (#31217186)
In a library. Loom is more about adapting the JVM itself for continuations and virtual threads than adding to userspace.