Integrated: Use one future

Paul Sandoz psandoz at openjdk.java.net
Fri Apr 15 17:49:38 UTC 2022


On Wed, 13 Apr 2022 23:25:28 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:

> Here's an example of changing the structured task scope impls, using one `Future` field and comparing future states. In effect the state can only increase monotonically (as per the order determined by the comparator).
> 
> The single future field could be made non-volatile, using the `VarHandle` for the volatile read in `handleComplete` since the happens-before edge should ensure the future is visible to the reading thread after `join`.

This pull request has now been integrated.

Changeset: 01119f29
Author:    Paul Sandoz <psandoz at openjdk.org>
URL:       https://git.openjdk.java.net/loom/commit/01119f2948c07dc88e6a3a21247a09bfe3d0f068
Stats:     133 lines in 1 file changed: 40 ins; 32 del; 61 mod

Use one future

Reviewed-by: alanb

-------------

PR: https://git.openjdk.java.net/loom/pull/144


More information about the loom-dev mailing list