[foreign-memaccess] [Rev 02] RFR: Alternative scalable MemoryScope

Maurizio Cimadamore mcimadamore at openjdk.java.net
Wed May 6 13:27:28 UTC 2020

On Wed, 6 May 2020 12:54:59 GMT, Peter Levart <plevart at openjdk.org> wrote:

> Yeah, I was just thinking of the situation where a segment is passed to parallel stream and the threads of parallel
> stream operate on slices (acquired children) in read-only way, since this is the source of information and should not
> be mutated. Now if the segment was created and written to in one thread before handed to parallel stream then workers
> from the FJPool may not see the content of their slices (acquired children) fully initialized since normal
> synchronization like dispatch of control to other thread presumably doesn't have the same effect on the off-heap memory
> (on all platforms)?

I'm fine with adding the fence in principle - if it adds too much overhead (which I didn't try), I think we should
leave it out though, since the benefits are limited.


PR: https://git.openjdk.java.net/panama-foreign/pull/142

More information about the panama-dev mailing list