[foreign-memaccess] RFR: 8253243: Investigate ways to make MemorySegment::ofNativeRestricted more composable

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Wed Sep 16 20:55:56 UTC 2020


I see what you mean, but I think that I'd still slightly prefer having a 
single API point instead of two.

I'm sure there will be opportunities to discuss this further (e.g. 
pre-integration code review).

Maurizio

On 16/09/2020 21:25, Ty Young wrote:
>
> On 9/16/20 9:56 AM, Maurizio Cimadamore wrote:
>> MemoryAddress.NULL
>>      .asSegmentRestricted(Long.MAX_VALUE)
>>      .withOwnerThread(null)
>>      .withAccessModes(READ | WRITE);
>>
>
> Is there any chance withOwnerThread could be changed so it doesn't 
> accept a null? A null mutable Thread variable could unintentionally be 
> interpreted as no-thread which may not be desirable.
>


More information about the panama-dev mailing list