Thanks, Hongli. If I need to use a thread, I might as well not use libev for this case, and simply do everything in that thread.
On Sun, Jun 5, 2011 at 9:50 AM, Hongli Lai <[email protected]> wrote: > On Sun, Jun 5, 2011 at 3:40 PM, Aaron Boxer <[email protected]> wrote: >> Hello! >> >> Is it possible to use libev to have non-blocking access >> to a blocking system call? In my server, I want to call posix_fadvise() >> on a file, and want to receive a callback when the call returns. > > You need to run your system call in a thread, then have the thread > notify the thread running libev through ev_async. This is the approach > that libeio uses. > > -- > Phusion | Ruby & Rails deployment, scaling and tuning solutions > > Web: http://www.phusion.nl/ > E-mail: [email protected] > Chamber of commerce no: 08173483 (The Netherlands) > > _______________________________________________ > libev mailing list > [email protected] > http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev _______________________________________________ libev mailing list [email protected] http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev
