Java Virtual Threads Preview
There is a spectrum of solutions for dealing with slow I/O in programming languages (well, all I/O is best assumed to be slow I/O).  At the two ends of the spectrum are:- continuation-passing style (CPS), hand-coded or compiler- preemptive threading / processesIn between lie various solutions, like async/await (closer to CPS), and green threads (closer to preemptive threading).The key difference between the two ends of this spectrum is memory footprint.  With CPS you manually compress state into tuned structures.  With threads you store state all over the stack in very inefficient ways because all those stack frames take extra space.Any solution towards the thread side of the spectrum will yield significantly larger memory footprints than solutions towards the CPS side of the spectrum.On the other hand, solutions towards the CPS side of the spectrum can require writing application-specific schedulers if fairness issues arise.On the whole, solutions on the CPS side of the spectrum are better, IMO.Java is kinda stuck with threads, so green threads make some sense.  Of course, you can get pathological issues in M:N threading, so be careful about that.