Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: select/poll bug?
On Sun, Aug 03, 2008 at 02:58:50PM -0400, Perry E. Metzger wrote:
> > It is not on the install floppies.
>
> True, but there you link against the .a, not against the .so, and I
> think you'll find 80-90% of the library size vanishes.
Even when just using the basic async core it adds 20KB, which is 1/3 of
the size of the full program.
> > Nothing in this thread has shown a good reason for using it at all
>
> Actually, the whole thread argues for it. The library eliminates any
> need to know about the insane complications of what multiplexing
> system call to use on any given Unix variant.
Sorry? The only reason against poll given so far that is actually a
relevant was the OS X bug. In that case (and only in that case), it
might be better to use select.
> > -- the API is not excatly simpler than calling poll/select directly
> > in this case.
>
> libevent actually makes code like this a lot easier to read.
I might be the wrong person to ask as I did write a program using
libevent. I only did that as I wanted to avoid writing dynamic resizing
for poll at the time. Looking back, it was a mistake. Too much of
libevent is undocumented and unless you really need support for
kqueue/epoll backend and deal with a highly dynamic fd set, libevent is
not better than just writing the basic code by hand.
Joerg
Home |
Main Index |
Thread Index |
Old Index