RFR: Use one future
Paul Sandoz
psandoz at openjdk.java.net
Wed Apr 13 23:30:46 UTC 2022
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`.
-------------
Commit messages:
- Use one future
Changes: https://git.openjdk.java.net/loom/pull/144/files
Webrev: https://webrevs.openjdk.java.net/?repo=loom&pr=144&range=00
Stats: 133 lines in 1 file changed: 40 ins; 32 del; 61 mod
Patch: https://git.openjdk.java.net/loom/pull/144.diff
Fetch: git fetch https://git.openjdk.java.net/loom pull/144/head:pull/144
PR: https://git.openjdk.java.net/loom/pull/144
More information about the loom-dev
mailing list