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

Asynchronous handshakes

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 15
    • Fix Version/s: 16
    • Component/s: hotspot
    • Subcomponent:
    • Resolved In Build:
      b18

      Description

      Some JavaThread handshake operations must be performed by only the targeted
      thread(s). The most common situation is that a JavaThread should wait for
      something. If the targeted JavaThread is safepoint-safe (e.g., blocked/native) it
      can't start waiting and the VMThread can't wait for it.
      The JavaThread may be indefinitely safepoint-safe so the handshake operation may
      never be executed. The requesting thread cannot use a synchronous handshake
      since it might never finish.

      By letting the request be asynchronous and guarantee that the handshake
      operation will be performed if the thread tries to leave the safepoint-safe state, the
      requester can act as if the JavaThread was already waiting in that handshake
      operation.

      Right now a JavaThread can only have one handshake operation so an asynchronous
      handshake would thus block all other handshakes.

      This means that it's not enough to make the request asynchronous, but also a
      queue is needed to be able to process concurrent handshake operations.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rehn Robbin Ehn
              Reporter:
              rehn Robbin Ehn
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: