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 <hon...@phusion.nl> wrote:
> On Sun, Jun 5, 2011 at 3:40 PM, Aaron Boxer <boxe...@gmail.com> 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: i...@phusion.nl
> Chamber of commerce no: 08173483 (The Netherlands)
>
> _______________________________________________
> libev mailing list
> libev@lists.schmorp.de
> http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev

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

Reply via email to