[foreign-abi] RFR: 8253823: Investigate ways to make handoff-like operation more explicit [v2]
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Wed Sep 30 13:11:06 UTC 2020
On Wed, 30 Sep 2020 11:25:54 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
>> Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Revert commented lines in StdLibTest
>
> src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/MemorySegment.java line 947:
>
>> 945: * segment produced by this transform will feature a cleanup action which will first call the
>> user-provided action, 946: * before delegating back to cleanup action associated with the source segment.
>> 947: * Any errors and/or exceptions thrown by the user-provided action will be discarded, and will not prevent
>> the
>
> Missing `<p>` here?
Will fix
> src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/MemorySegment.java line 959:
>
>> 957: * Specifies an additional attachment object which will be kept alive by the target segment, in addition
>> 958: * to any attachment object which might also be associated with the source segment.
>> 959: * This can be useful in cases where the lifecycle of the segment is dependent on that of some other
>> external resource.
>
> This doesn't make sense to me really. Isn't it more the other way around? I.e. the lifecycle of an external resource
> should be dependent on the lifecycle of the target segment?
I guess what I wanted to mean here is if the segment depends on some memory source which is maintained externally and
must be kept alive. That is the bytebuffer case - you have a segment which has to keep the BB alive, otherwise access
with segfault.
-------------
PR: https://git.openjdk.java.net/panama-foreign/pull/361
More information about the panama-dev
mailing list