On Fri, 13 Oct 2023 17:31:15 GMT, Maurizio Cimadamore <mcimadam...@openjdk.org> 
wrote:

>> This PR makes sure that `MemorySegment` is initialized *before* any of its 
>> subclasses.
>> This is done by centralizing all the memory segment factories in a single 
>> implementation class (`SegmentFactories`).
>> Doing so addresses a possible deadlock condition when using multiple threads.
>
> Maurizio Cimadamore has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Address review comments

src/java.base/share/classes/jdk/internal/foreign/SegmentFactories.java line 49:

> 47:  */
> 48: public class SegmentFactories {
> 49: 

We could make this a proper utility class by declaring the class final and 
having a private constructor.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16187#discussion_r1358610000

Reply via email to