Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8300275

SegmentScope.isAccessibleBy returning incorrect values

XMLWordPrintable

        MemorySegment.allocateNative(1024, SegmentScope.auto()).scope().isAccessibleBy(Thread.currentThread()) returns false.
        Similarly
        MemorySegment.allocateNative(1024, SegmentScope.global()).scope().isAccessibleBy(Thread.currentThread()) returns false too.
        From documentation of SegmentScope.auto(), SegmentScope.global(), the returned scope object is accessible by any thread.

        Arena.openShared().scope().isAccessibleBy(Thread.currentThread()) returns false. Though shared scope documentation doesn't explicitly state accessibility by multiple threads, the result is counter intuitive

              mcimadamore Maurizio Cimadamore
              pgundarlahal Prashanthram Gundarlahally
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: