<div dir="ltr">I just started playing with Undertow, but I had a couple of questions about the use of non-blocking operations vs using the worker thread pool.<div><br></div><div>In the <a href="https://github.com/undertow-io/undertow/blob/master/core/src/main/java/io/undertow/server/handlers/resource/ResourceHandler.java#L320">ResourceHandler.java</a> it appears to dispatch itself onto a worker thread, and then uses blocking file IO to actually read the file. I&#39;m curious why a <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/channels/AsynchronousFileChannel.html">AsynchronousFileChannel</a> wasn&#39;t used to read from the file in a non-blocking way? This would be in keeping with the non-blocking IO threads.</div><div><br></div><div>I wrote a quick HttpHandler that used the <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/channels/AsynchronousFileChannel.html">AsynchronousFileChannel</a> and it worked really well. However, when creating <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/channels/AsynchronousFileChannel.html">AsynchronousFileChannel</a> you have to specify the ExecutorService to be used to schedule the completion handler callback on. I was able to use exchange.getIoThread().getWorker(), but I&#39;m curious if there is a way to schedule it back on the IO Threads? It just seems &quot;purer&quot; keeping everything on a single IO thread per core.</div><div><br></div><div>thanks</div><div>Andrew</div></div>