[foreign-memaccess] [Rev 03] RFR: Move "owner" field and thread-confinement checks to MemoryScope
Peter Levart
plevart at openjdk.java.net
Fri May 15 14:38:45 UTC 2020
On Fri, 15 May 2020 13:32:59 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
>>> This changes the behavior we had before in AbstractMemorySegmentImpl::checkValidState. We should still do the liveness
>>> check even if there is no owner.
>>
>> True - I suspect Peter would argue that such check doesn't make much sense in a racy context - but still, there's a
>> change in behavior here.
>
> IMO It's not necessarily racy, it's just that the API doesn't guarantee that there is no race, that's up to the user to
> do. e.g. by making sure that the thread doing the access can see an up to date liveness flag (by using other
> synchronization).
Ok, then another change follows...
-------------
PR: https://git.openjdk.java.net/panama-foreign/pull/167
More information about the panama-dev
mailing list