Small issue with StructuredTaskScopeImpl.ensureOwner

Kasper Nielsen kasperni at gmail.com
Mon Dec 29 12:43:55 UTC 2025


>
> We can look at improving the exception message but I'm curious how you ran into this, was it a subtask getting a reference to its parent's scope or something more complicated?
>
> -Alan

I  was wrapping StructuredTaskScope in an API for a library of mine.
I mainly use it for supporting lifecycle operations of objects, a.la.
run .start() on all these objects.
Each start() method could then choose to fork some work.
The way the API is structured  allows users to fork from a subtask.
But I'm going to make some changes to the API so this cannot be done.

Best
  Kasper


More information about the loom-dev mailing list