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

Asynchronous handshakes

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 16
    • 15
    • hotspot
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: