[foreign-memaccess] [Rev 02] RFR: JDK-8243073: Add support for serial confinement

Paul Sandoz psandoz at openjdk.java.net
Tue Apr 21 16:25:39 UTC 2020


On Tue, 21 Apr 2020 10:43:00 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> This patch adds support for serial confinement - e.g. a handoff operation to transfer ownership from thread A to thread
>> B.
>> The implementation is based on some iterations we have done in the past. I've added a test, and I've also rewritten
>> some of the existing tests not to rely on waits, but to use latches instead, as observed by Paul.
>
> Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Clarify javadoc after discussions with Doug and Paul

src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/MemorySegment.java line 202:

> 201:      * <p>
> 202:      * Write accesses to the segment’s content happens before hand-over from the current owner thread to the
> 203:      * new owner thread, which in turn happens before read accesses to the segment’s contents on

Minor tweak.  Suggest adding link to the first happens-before e.g.:

(Unsure what the base path is for the link.)
<a href="<...>/java/util/concurrent/package-summary.html#MemoryVisibility"><i>happens-before</i></a>

and subsequent declarations using just emphasis.

-------------

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


More information about the panama-dev mailing list