Ask HN: Java 21 virtual threads concurrency model
In Java 21, virtual threads are mounted / unmounted on carrier threads for execution and there usually are multiple carrier threads in the JVM. This still remains a multithreaded concurrency model. Is it not possible to provide an option wherein a parent virtual thread and all its child virtual threads be mounted on the same carrier thread? In other words, carrier thread affinity. This would result in a simple single threaded concurrency model (and one could have gotten away from using locks and synchronization). Thanks.
0 comments
[ 3.1 ms ] story [ 11.7 ms ] threadNo comments yet.