Runnable demos for the ankurm.com structured-concurrency-java article: the ExecutorService thread leak and its fix, every built-in Joiner, structure violations, timeouts, a custom Joiner, JSON thread dumps (in-process and jcmd), scoped values, javap diffs of the API on 25, 26, 27 and 28-ea, compiler output for six pieces of 25/26-era code, and the preview class-file trap between 27 and 28. Transcripts in output/. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01CifR2BE7PBvRy5hT8TS9oz
21 lines
360 B
Plaintext
21 lines
360 B
Plaintext
$ java RandomTasks 5 (28-beta+21-ea)
|
|
Duration: 487
|
|
Duration: 92
|
|
Duration: 474
|
|
Duration: 424
|
|
Duration: 506
|
|
Result: 487
|
|
Result: 92
|
|
Result: 474
|
|
Result: 424
|
|
Result: 506
|
|
|
|
$ java RandomTasks 3 (28-beta+21-ea)
|
|
Duration: 734
|
|
Duration: 660
|
|
Duration: 210
|
|
Duration: 581
|
|
Duration: 128
|
|
ExecutionException: TooSlowException: Duration 734 greater than threshold 700
|
|
|