Boost logo

Boost :

From: Don G (dongryphon_at_[hidden])
Date: 2005-04-02 02:36:28

Hi Maxim,

Thanks for the pointer to libevent; it is interesting. Please find my
reply below.

--- Maxim Yegorushkin <e-maxim_at_[hidden]> wrote:
> Iain Hanson wrote:
>>> On Fri, 2005-04-01 at 19:57 +0400, Maxim Yegorushkin wrote:
>>> By the way, we use libevent and are happy with it. It's
>>> portable (Linux/Windows) and has very simple interface. I
>>> just don't see a need for the stuff you guys are
>>> discussing here.
>> Because we like our libraries spelt in C++ :-).
> So do I.
> Nevertheless, I like to keep simple things simple. I don't
> feel like I need a glue layer over simple socket and epoll
> api's.

epoll() is not available on even all Unix systems, let alone with
Windows sockets. AFAIK, the only multi-wait method on Windows is

That said, I don't find select/poll/epoll very pleasant and
would like to see them hidden completely. Manual mantenance of
structures and bit flags is not my idea of fun, and for the novice to
intermediate level developer this can be a frustrating and error
prone experience. Obviously, this is a bit of a subjective matter,
but the C nature of these API's makes them less than ideal for a C++
bigot such as myself ;)
> What I might need is an event demultiplexor. Heavy loaded
> servers I'm working on are event driven. Each event which
> is not naturally a file descriptor readiness change is
> transformed in a socket(pair) write, so that it can be
> demultiplexed by epoll_wait(). Thus, an application just
> handles events in a loop around epoll_wait(). So, I might
> need a little syntactic sugar around this stuff, but I have
> not elaborated my generic implementation yet.

This is exactly the kind of thing a general async library would solve
for you. When something is done, instead of calling send/write on a
socket that exists solely to make epoll happy, just queue the C++
call (i.e., a boost::function<> object).


Do you Yahoo!?
Make Yahoo! your home page

Boost list run by bdawes at, gregod at, cpdaniel at, john at