Java · Hard · Pro
StructuredTaskScope shutdown on failure — how avoid leaked tasks?
JavaConcurrencyStaff
StructuredTaskScope shutdown
StructuredTaskScope (preview/incubator) treats concurrent subtasks as a unit—if one fails, others are cancelled/interrupted and the scope closes so threads don't leak.