JDK-8222774 : (ch) Replace uses of stateLock and blockingLock with j.u.c. locks
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.nio
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-04-19
  • Updated: 2019-09-23
  • Resolved: 2019-04-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 13
13 b19Fixed
Related Reports
Duplicate :  
Relates :  
Description
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.