[foreign-memaccess] [Rev 01] RFR: Move "owner" field and thread-confinement checks to MemoryScope

Maurizio Cimadamore mcimadamore at openjdk.java.net
Fri May 15 11:50:26 UTC 2020

On Fri, 15 May 2020 11:47:16 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> Overall, I like this and I agree that moving ownership in scope makes the code easier to follow. I've added some
>> specific comments.
>> So maybe just remove the comment?
> No, leave it there - I'm fine with the explanation.

> ((MemoryScope)this).checkAliveConfined();
> Do you prefer such call gymnastics? If this class gets used elsewhere
> then maybe it will be required...

Ugh - I missed subclass usages. Perhaps a private static routine in the toplevel class. But it's also ok if you leave
it like that.


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

More information about the panama-dev mailing list