Loading…
Loading…
Twenty edge cases of modern Java concurrency that surprise experienced developers: virtual thread priorities and names, semaphores without owners, null scoped values, cancelling a CompletableFuture, pool sizing with unbounded queues, and StructuredTaskScope's strict rules.
Edge cases from the modern Java concurrency course. Most of these programs look harmless, and most of them behave differently from what a quick reading suggests.
Other code answers were confirmed by running them on Java 25. Structured-concurrency questions use the Java 27 preview API, which Java 28 makes final, and were checked against that API's behaviour. Aim for at least 14 out of 20.
Quiz path: step 10. Take the quizzes in this order, after reading each article.
Previous quiz: Java Concurrency Interview Questions (Virtual Threads, Structured Concurrency, Scoped Values)
20 questions · pass at 70%
Check your understanding; you see the answers and explanations after submitting.
Discussion
Sign in to ask a question or share what you learned.