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

Investigate ways to make handoff-like operation more explicit

XMLWordPrintable

      In the current memory segment API, there are some regular wither methods (withAccessModes, asSlice) which simply return a new memory segment, with different properties.

      Then we also have methods like withCleanupAction, withOwnerThread, registerCleaner which looks like wither methods, but in reality they side effect the current segment, by rendering it invalid.

      This is, often a source of confusion for clients. The fact that handing off a segment is a terminal operation should be more explicit in the API.

            mcimadamore Maurizio Cimadamore
            mcimadamore Maurizio Cimadamore
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: