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.
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.
- duplicates
-
JDK-8228568 resource leak caused by the setting or getting a socket option on SocketChannel
-
- Closed
-
- relates to
-
JDK-4648049 (ch) Stream adaptors do not usefully implement available()
-
- Closed
-