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

Alan Bateman alanb at openjdk.org
Wed Nov 9 09:20:35 UTC 2022


On Tue, 8 Nov 2022 22:12:46 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> This PR contains the API and implementation changes for JEP-434 [1]. A more detailed description of such changes, to avoid repetitions during the review process, is included as a separate comment.
>> 
>> [1] - https://openjdk.org/jeps/434
>
> 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.

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

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


More information about the core-libs-dev mailing list