RFR 8029452: Fork/Join task ForEachOps.ForEachOrderedTask clarifications and minor improvements

Paul Sandoz paul.sandoz at oracle.com
Thu Jan 16 11:26:17 UTC 2014


On Jan 10, 2014, at 2:42 PM, Paul Sandoz <Paul.Sandoz at oracle.com> wrote:
> I have also removed the inconsistently applied synchronized block. Either we apply it consistently to reporting or not at all. It was originally there because we were not sure that the "happens-before" relationship [1] between elements would be guaranteed. However, ForEachOrderedTask sets up such a relationship via completion counts to ensure leaf nodes complete in encounter order (if any) where only one leaf can be completing (which was left most leaf that was not completed), hence stamping a fence in the ground at these point seems redundant (at least i cannot see its value but could be missing something subtle).
> 

I updated with some more comments explaining how the "happens-before" is preserved:

  http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8029452-ForEachOrdered/webrev/

Paul.


More information about the core-libs-dev mailing list