On Mon, Aug 18, 2014 at 01:28:55PM +0200, Hongli Lai <hon...@phusion.nl> wrote:
> 1. If I cancel eio_open(), and the system call has already finished,
> then if the callback isn't called, the file descriptor becomes lost
> and there would be no way to close it.

I am not sure why you think that, does IO::AIO lose fd's on cancelled
requests? If yes, I'd like to understand how it happens.

> 2. The user data that I pass to eio functions is allocated on the
> heap. Currently, I free the user data in the callback. If the callback
> isn't called, then I would have to introduce additional book keeping
> data structures and timers just to clean up the user data correctly.
> This would introduce all sorts of new code paths, significantly
> increasing the complexity of my codebase.

Same thing, I don't see a lot of this in IO::AIO, in both cases, the
resources will be freed when the request is destroyed. I would say doing
it in the completion callback involves more bookkeeping.

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      schm...@schmorp.de
      -=====/_/_//_/\_,_/ /_/\_\

_______________________________________________
libev mailing list
libev@lists.schmorp.de
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev

Reply via email to