RFR: Structured concurrency support for scoped locals
Alan Bateman
Alan.Bateman at oracle.com
Wed Feb 19 07:42:48 UTC 2020
On 18/02/2020 22:46, Brian Goetz wrote:
> I presume that the public `setParent()` method is there as a quick
> hack for purposes of prototyping, and not intended as an API proposal?
It's not public and I assume it just to get the PoC working. Threads
usually inherit at Thread creation time (rather than start time which
can be problematic sometimes when an unstarted Thread is passed around).
In any case, my reading of this PoC is that its for one scenario/usage
only as it doesn't prevent the scoped binding in the parent from being
closed (or mutated?) and I assume it doesn't work with thread pools
where the setup/tear-down is around the task rather than the thread.
This area will likely require many rounds of exploration and prototyping.
-Alan
More information about the loom-dev
mailing list