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

(ch) Replace uses of stateLock and blockingLock with j.u.c. locks

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 13
    • None
    • core-libs
    • b19

      Closing a SelectableChannel is a blocking operation when the channel is configured blocking and there are threads blocked in I/O operations. The use of stateLock is problematic for the future world of fibers and should be replaced with an explicit lock.

      The socket adaptors rely on the channel's blockingLock to prevent the channel from being configured to non-blocking during an operation. This is not required as configurationBlocking must also coordinate with threads doing I/O operations. The socket adaptors can be re-worked to not use the blocking lock.

            alanb Alan Bateman
            alanb Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: