[concurrency-interest] ForkJoinTask.fork() enforces visibility?
dl at cs.oswego.edu
Tue Mar 20 06:47:14 EDT 2012
On 03/20/12 06:15, Aleksey Shipilev wrote:
> On Tue, Mar 20, 2012 at 1:31 PM, Aleksey Shipilev
> <aleksey.shipilev at gmail.com> wrote:
>> I had looked over FJP javadoc and saw no other visibility guarantees
>> there. I remember Brian Goetz' article describing FJP is guaranteeing
>> visibility in cases like this. It would be perfect to reflect that in
> Aha, ExecutorService javadoc is saying:
> "Memory consistency effects: Actions in a thread prior to the
> submission of a Runnable or Callable task to an ExecutorService
> happen-before any actions taken by that task, which in turn
> happen-before the result is retrieved via Future.get()."
> Does this extend to ForkJoinTask.fork()?
Yes. Thanks for pointing out that we need an explicit statement
to this effect in ForkJoinTask. We'll add one.
More information about the Concurrency-interest