There is a simple situation like:
Thread A: try to read from a FileChannel
like
length = tun.read(tunPacket.buffer);
This operation is block the this A thread.
Thread B: wait for a user input, (Stop button). When this event happens, calls A's interrupt()
method. Despite the fact that FileChannel
is implements AbstractInterruptibleChannel
, this is not throw ClosedByInterruptException
I'm using Android 6.0, if matter, and there is the documentation
I'm trying to resolve this problem but looks impossible...