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

Simplify support for shared memory segment

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • None
    • repo-panama
    • tools

      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.

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

              Created:
              Updated:
              Resolved: