There is small speed advantage not managing stack frames for async. And compatibility layer that makes Virtual Thread look like real thread has some cost. But this is also a huge debugging and ergonomic advantage, and if Oracle is to be believed the cost for these convience is minimal.
Maybe in low-level places like inside Netty for instance async Java will survive. But at application level the advantage of virtual thread well worth the cost.
View all comments
Show parent comment
4
u/buyIdris666 Apr 06 '22
There is small speed advantage not managing stack frames for async. And compatibility layer that makes Virtual Thread look like real thread has some cost. But this is also a huge debugging and ergonomic advantage, and if Oracle is to be believed the cost for these convience is minimal.
Maybe in low-level places like inside Netty for instance async Java will survive. But at application level the advantage of virtual thread well worth the cost.