Patch: fix libeio cancellation

Marc Lehmann schmorp at
Mon Aug 18 06:34:45 CEST 2014

On Mon, Aug 04, 2014 at 09:02:41AM +0200, Hongli Lai <hongli at> wrote:
> According to the libeio documentation, the callback will still be
> called even if the request has been cancelled. The libeio code checks
> for the cancel flag, and does not call the callback if it's set. This
> happens even if the system call has already finished.

Hi, thanks, and sorry for the late reply.

Looking at the existing documentation, it's not clear what should happen, but
IO::AIO docs and the code agree that callbacks should not be invoked, while
eio.pod pretty clearly states it is.

I think it is the eio documentation which is in error here (after
all, it's still unfinished and uncorrected), and plan to fix this by
correcting eio.pod, unless you can present an overriding reason to change
the behaviour - I can't see one, though, as request cancellation is
asynchronous, and there is no way to see if a result was partial or not.

                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_    
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      schmorp at
      -=====/_/_//_/\_,_/ /_/\_\

More information about the libev mailing list