RFR 8029452: Fork/Join task ForEachOps.ForEachOrderedTask clarifications and minor improvements
paul.sandoz at oracle.com
Fri Jan 10 18:18:31 UTC 2014
On Jan 10, 2014, at 7:11 PM, Mike Duigou <mike.duigou at oracle.com> wrote:
>> The second tweak is to consolidate the reporting of elements to within the ForEachOrderedTask.tryComplete method.
>> 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  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).
> Coud not the lock object be removed?
Doh, yes, thanks, updated,
More information about the core-libs-dev