JDK-8236246 : SelectorProvider support for creating a DatagramChannel that is not interruptible
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.nio
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-12-19
  • Updated: 2024-01-08
  • Resolved: 2019-12-20
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 15
15 b03Fixed
Related Reports
Blocks :  
Relates :  
Description
A DatagramChannel is an InterruptibleChannel so blocking I/O operations (specifically receive and read) need to be interruptible. This is problematic for a future DatagramSocket/MulticastSocket implementations that uses a DatagramChannel under the covers as the legacy APIs do not support interruption. It would be desirable to have an easy, but JDK internal, way to create a DatagramChannel that is not interruptible.

While in the area, it would also be desirable if SelectorProvider's open methods didn't use a static lock object. There is no need to synchronize when creating network channels. It is possible that this lock is contended in some environments.
Comments
URL: https://hg.openjdk.java.net/jdk/jdk/rev/f93bd058a4ce User: alanb Date: 2019-12-20 09:41:30 +0000
20-12-2019