0

I need to open an async file channel in a Netty handler. Do I need to do that on a background thread?

It seems logical that AsynchronousFileChannel's open() method would be a blocking operation but I am unable to find any confirmation.

I have googled this question extensively and tried to find the source but I think the answer is deep in some native code that is not widely available.

Thanks

  • In Netty, the act of opening an AsynchronousFileChannel itself is a non-blocking operation. The AsynchronousFileChannel#open() method returns a Future that represents the result of the open operation. You can use this Future to perform further operations asynchronously, such as reading or writing data from the file. – Jelmen Jun 20 '23 at 13:31

0 Answers0