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

Simplify support for shared memory segment

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: repo-panama
    • Fix Version/s: None
    • Component/s: tools

      Description

      The current implementation for shared segment is based on the idea that, if a thread is closing a segment while the segment is being accessed by other threads, the closing thread should terminate all other threads using an asynchronous exception.

      While this approach is elegant (the close operation always succeeds) there are some low level implementation issues associated with the fact that async exceptions are not dealt with uniformly across the VM (and compilers); so there is a non trivial chance that a code path which does not check for async exception might create problems down the road.

      A workaround would be not to rely on async exceptions; instead, we could have close() fail - while this seems mildly unpleasant, in reality this still achieves the API safety goal, and it is a clear sign that user requires more synchronization.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: