said and done, I couldn't reist to try to "out-bundle" the aio code from IO::AIO.
here is what I came up so far, it does work when embedded into IO::AIO, so the code is mostly sane. http://cvs.schmorp.de/libeio/ whats missing is, obviously, documentation, Makefile and general quality work. the current api design is similar to what I announced, but it doesn't support a result pipe (instead, it is completely independent of any event loop or signalling mechanism. it would be trivial to add a result pipe to it). http://cvs.schmorp.de/libeio/eio.h If there is demand, I can refine it further and add some documentation, maybe even make releases. For this, howver, I would require somebody who regularly made tests and would use the library (as I currently have no use for it outside IO::AIO, which makes it hard to test it outside perl). Comments about API design and requirements would be welcome as well (also questions - not everything is self-evident). Integration into libev would probbaly done like this (I am thinking about changing ev_async, btw., from edge-triggering to level-triggering, similar to io-events) (pseudo-code): ev_async aio; static want_poll (void) { ev_async_send (EV_DEFAULT_UC_ &aio); } static do_poll (ev_async *w, int) { if (eio_poll () < 0) // not all requests handled, need to call again ev_async_send (EV_DEFAULT_UC_ w); } ev_async_init (&aio, do_poll); ev_async_start (EV_DEFAULT_ &aio); eio_init (want_poll, 0); eio_write (... ev_loop (0); -- The choice of a Deliantra, the free code+content MORPG -----==- _GNU_ http://www.deliantra.net ----==-- _ generation ---==---(_)__ __ ____ __ Marc Lehmann --==---/ / _ \/ // /\ \/ / [EMAIL PROTECTED] -=====/_/_//_/\_,_/ /_/\_\ _______________________________________________ libev mailing list [email protected] http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev
