@Override
  protected void implCloseChannel() {
    // interrupt the current blocking threads, if any, causing them to throw
    // ClosedByInterruptException
    try {
      synchronized (blockingThreads) {
        for (Thread thread : blockingThreads) {
          thread.interrupt();
        }
      }
    } finally {
      fileSystemState.unregister(this);
      file.closed();
    }
  }
Ends a blocking operation, throwing an exception if the thread was interrupted while blocking
or if the channel was closed from another thread.
jimfs/src/main/java/com/google/common/jimfs/JimfsFileChannel.java