More useful structured concurrency stack traces

Ron Pressler ron.pressler at oracle.com
Thu Jul 11 15:36:19 UTC 2024


> On 9 Jul 2024, at 19:50, Louis Wasserman <lowasser at google.com> wrote:
> 
> My understanding of the structured concurrency APIs now in preview is that when a subtask is forked, exceptions thrown in that stack trace will have stack traces going up to the beginning of that subtask, not e.g. up the structured concurrency task tree.  (My tests suggest this is the case for simple virtual threads without structured concurrency.)  

If the exception is of interest to the owner scope, then the stack trace will go “up the tree”, since when exceptions are propagated through scopes they are wrapped by the scope, which adds the relevant stack trace of the scope owner’s thread.

— Ron


More information about the loom-dev mailing list