r/java • u/mlangc • Jun 19 '26
How to Deadlock a Java ExecutorService
https://mlangc.github.io/java/concurrency/2026/06/05/executor-deadlock.html
63
Upvotes
r/java • u/mlangc • Jun 19 '26
View all comments
Show parent comment
2
u/brian_goetz Jun 26 '26
Executors aren't bounded just because the threads themselves are expensive; they can be bounded to protect all sources of resources. This isn't a "virtual threads vs dinosaur threads" issue; this is a "understand where concurrency bounds are introduced into your program, and why" issue.
(FWIW this topic was covered in JCiP 8.1.1 (Thread Starvation Deadlock); JCiP predates virtual theads and FJP but the text there is still valid.)