1 2 Previous Next 16 Replies Latest reply on Nov 29, 2009 4:48 PM by clebert.suconic

    Semantics of maxIO are different for NIO and AIO

    timfox

      This really confused me.

      The semantics of what max IO means for NIO and AIO are completely different.

      For NIO, the maxIO semaphore is obtained before writing to the write queue, and released when the write is complete.

      So for NIO it effectively puts an upper bound on the size of the write queue.

      For AIO it means no such thing!

      In AsynchronousFileImpl, the semaphore is obtained as a write is *removed* from the write queue, and is released when the completion for the write happens.

      So for AIO the write queue is actually unbounded, and max io limits the *number of uncompleted AIO operations*.

      This is a completely different meaning to the NIO implementation.

      I'm going to fix this and make it consistent today.

        1 2 Previous Next