5 ms·
You might want to read the “prior art” section of their article…
by gdcbe 28d ago
You might want to read the “prior art” section of their article…
- embedding-shape 28d agoWho's right though? The article seems to go directly against what parent said above? > In Java, there’s a similarly looking thread interruption mechanism. Critically, it doesn’t support interrupting syscalls: IOException and InterruptedException are both checked and unrelated, meaning that IOing functions are not interruptible One says IOing functions are not interruptible, other says "You can interrupt a blocking IO operation" :)
- Sharlin 28d agoThe article seems to talk about how `Thread.interrupt` works with synchronous IO, rather than the async IO machinery of `java.nio`. So I'd say the article is inaccurate or at least incomplete.
- lowbloodsugar 27d agoNIO can be blocking or non-blocking. Indeed you can switch between the two on a single channel.
- twic 28d ago> IOException and InterruptedException are both checked and unrelated https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/InterruptedIOException.html https://docs.oracle.com/en/java/javase/25/docs/api/java.base...
- deleted 28d ago[deleted]
- paulddraper 27d agoSort of. The article just references Thread.interrupt