[foreign-preview] RFR: 8281855: Rename ResourceScope to MemorySession

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Wed Feb 16 22:07:11 UTC 2022


That would be an implicit session. Implicit sessions are back to being 
non-closeable, and shared, in this patch.

Maurizio

> src/java.base/share/classes/java/nio/Direct-X-Buffer.java.template line 306:
>
>> 304:         if (scope != null) {
>> 305:             if (scope.ownerThread() == null && scope.isCloseable()) {
>> 306:                 throw new UnsupportedOperationException("ByteBuffer derived from closeable shared segments not supported");
> Reviewer note: does user have the power to create non-closeable shared segments now?
>
> -------------
>
> PR: https://git.openjdk.java.net/panama-foreign/pull/641


More information about the panama-dev mailing list