Small issue with StructuredTaskScopeImpl.ensureOwner

David Alayachew davidalayachew at gmail.com
Fri Dec 26 17:27:43 UTC 2025


I ran into something similar, but forgot to report it.

I think your idea is good, and should be added.


On Fri, Dec 26, 2025, 6:01 AM Kasper Nielsen <kasperni at gmail.com> wrote:

> Hi,
>
> I encountered a WrongThreadException the other day from invalid use of
> StructuredTaskScope. However, finding out why was a bit more difficult
> than needed. I had to fire up a debugger to get the owning thread of
> my StructuredTaskScope. It would have been somewhat easier to figure
> out what exactly went wrong if StructuredTaskScopeImpl.ensureOwner
> included the name of both the owning thread, and the current thread in
> its error message.
>
> /Kasper
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20251226/21439e93/attachment.htm>


More information about the loom-dev mailing list