RFR: 8295044: Implementation of Foreign Function and Memory API (Second Preview) [v14]

Maurizio Cimadamore mcimadamore at openjdk.org
Wed Nov 9 11:00:33 UTC 2022


On Wed, 9 Nov 2022 09:16:49 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix typo
>
> src/java.base/share/classes/java/lang/foreign/Arena.java line 131:
> 
>> 129:      * @param thread the thread to be tested.
>> 130:      */
>> 131:     boolean isOwnedBy(Thread thread);
> 
> A shared Arena can be closed by any thread. Should a shared Arena be considered as being owned by all threads so that this method always returns true for a non-null thread? In the old API, a shared memory session has no owner so it was a bit clearer. I think my comment is mostly about the method name being about ownership, whereas the javadoc is about who can close.

Very good point - all threads are owners.

-------------

PR: https://git.openjdk.org/jdk/pull/10872


More information about the core-libs-dev mailing list