Fwd: Structured Concurrency - Stacktrace in tree hierarchical structure
Alan Bateman
alan.bateman at oracle.com
Fri Nov 29 14:44:15 UTC 2024
On 29/11/2024 11:38, Abdul Muneer K wrote:
> Yes, I was expecting the nesting on the raw JSON. Volkan explained
> enough to understand the issue of nesting at the raw JSON, Thanks.
>
> Regarding the naming, suppose we create a StructuredTaskScope with
> default constructor(without a custom thread factory), can we set a
> custom name to each subtask? If we can set a name for subtasks, it
> will be easy to trace the threads from the thread dump.
>
Code executing in the subtask can use
Thread.currentThread().setName(name), or the Callable can be wrapped to
do the same. So yes, possible if you don't specify a ThreadFactory.
-Alan
More information about the loom-dev
mailing list