ev.h:560: warning: nested extern declaration of 'ev_default_loop_ptr'

2013-04-04 Thread Mikhail T.
Trying to compile a simple test-program against libev-4.15 using gcc-4.2.1 (the base compiler on FreeBSD), I get the following compiler warning: cc -O2 -pipe -march=nocona -fno-strict-aliasing -I/opt/include -Werror -std=gnu99 -fstack-protector -Wsystem-headers -Wall -Wno-format-y2k -W

watching for new files: libevent vs. libev

2013-04-04 Thread Mikhail T.
Hello! By adding EV_ET to the flags, I can watch a directory for changes -- such as files being added or removed to it -- using libevent (at least, on FreeBSD). Sample program attached. Does libev provide a similar functionality? Some mailing list archives suggest, edge-triggered events aren't

Re: ev.h:560: warning: nested extern declaration of 'ev_default_loop_ptr'

2013-04-04 Thread Jann Horn
On Thu, Apr 04, 2013 at 12:54:24PM -0400, Mikhail T. wrote: Trying to compile a simple test-program against libev-4.15 using gcc-4.2.1 (the base compiler on FreeBSD), I get the following compiler warning: cc -O2 -pipe -march=nocona -fno-strict-aliasing -I/opt/include -Werror -std=gnu99

Re: watching for new files: libevent vs. libev

2013-04-04 Thread Jann Horn
On Thu, Apr 04, 2013 at 01:04:35PM -0400, Mikhail T. wrote: Hello! By adding EV_ET to the flags, I can watch a directory for changes -- such as files being added or removed to it -- using libevent (at least, on FreeBSD). Sample program attached. Does libev provide a similar functionality?

Re: watching for new files: libevent vs. libev

2013-04-04 Thread Marc Lehmann
On Thu, Apr 04, 2013 at 01:04:35PM -0400, Mikhail T. mi+t...@aldan.algebra.com wrote: By adding EV_ET to the flags, I can watch a directory for changes -- such as files being added or removed to it -- using libevent (at least, on FreeBSD). Sample program attached. I don't quite understand why

Re: Background tasks with libev

2013-04-04 Thread Marc Lehmann
On Wed, Apr 03, 2013 at 01:19:31PM -0400, Kevyn-Alexandre Paré kap...@rogue-research.com wrote: As my past habits was to always create a thread when something requires more processing time. I'm a bit confused to when to use thread with libev and how to manage longer tasks. My first thought is