Settings

Theme

Ask HN: Java 21 virtual threads concurrency model

1 points by deepakarora3 2 years ago · 0 comments · 1 min read

Reader

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.

No comments yet.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection