Why are we getting ClosedByInterruptException from FileChannel.map in Java 1.6?

前端 未结 2 342
不思量自难忘°
不思量自难忘° 2020-12-06 16:43

A customer of ours complains that, sporadically, calls of ours to FileChannel.map fail with a ClosedByInterruptException. The Javadoc does not list

相关标签:
2条回答
  • 2020-12-06 17:07

    Channel operations are bound to the thread doing the operations. If this thread is interrupted, the stream / channel is closed due to IO safety issues.

    0 讨论(0)
  • 2020-12-06 17:09

    The last comment contains the answer. There was a thread pool in use, and at shutdown interrupts were delivered.

    0 讨论(0)
提交回复
热议问题