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

JDK 1.4 ClosedByInterruptException feature is inappropriate

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: 1.4.0
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description



      Name: bsC130419 Date: 06/13/2001


      JDK 1.4.0Beta. Precise information not relevant because this is a design issue.

      Thread.interrupt closes channels - why?

      The motivation for the ClosedByInterruptException feature is obscure.
      Previously, when a thread doing any I/O is interrupted, it would incur an
      InterruptedIOException. I can't see the justification for changing this
      semantic in the case of java.nio Channels and I can't see any justification for
      the channel being closed. The read or write or select should be interrupted but
      unless there is some major hidden implementation issue there is no apparent
      reason to interfere with the integrity of the channel.

      Or does it have to do with maintaining the channel state accurately? If so I
      think this should be stated, as the whole feature is counter-intuitive and
      needs justification.
      (Review ID: 126429)
      ======================================================================

        Attachments

          Activity

            People

            • Assignee:
              mr Mark Reinhold
              Reporter:
              bstrathesunw Bill Strathearn (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: