ScopedValue structured forking/forwarding API
Andrew Haley
aph-open at littlepinkcloud.com
Mon Jul 14 15:00:55 UTC 2025
On 14/07/2025 15:17, Pedro Lamarão wrote:
> IIRC, integration 2 requires merging values bound to the continuation
> with values bound to the thread at each "resume" point and then provided
> to the coroutine. Is this not the domain of the transformer or
> scheduler? shouldn't this be implemented in that layer? This way, Kotlin
> would guarantee structural integrity -- there would be no way for the
> user to fail to satisfy runtime requirements
In effect we already do exactly this with Java's
jdk.internal.vm.Continuation class, but that's not available to client
code such as Kotlin. So sure, it's the job of the transformer, but there
isn't an API that such a transformer can use.
--
Andrew Haley (he/him)
Java Platform Lead Engineer
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
More information about the loom-dev
mailing list