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

Task termination needs to close all NIO closeables

XMLWordPrintable

    • generic
    • generic

      NIO doesn't use finalizers but instead requires that the close method be invoked explicitly (all types with native resources implement java.io.Closeable). In addition, some of the types have operations that result in a thread being blocked in native code (usually a system call). Selector.select for example, or any SelectableChannel channels configured in blocking mode. There are also objects that have internal daemon threads - for example WatchService and AsynchronousChannelGroup. All these types are asynchronously closeable so invoking close will cause any blocked threads (including internal threads) to wakeup and free all native resources.

      This bug tracks adding support in MVM so that it invokes the close method of each of the NIO Closeable types so as to free resources and unblock any threads.

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: