From: Maxim Yegorushkin (e-maxim_at_[hidden])
Date: 2005-04-02 05:52:19
Don G wrote:
>> 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).
IMO, this contradicts with the thread title. Non-blocking and async are
not the same.
Non-blocking event model with select/poll/epoll is when you get notified
when a read or write won't block. Async model with Windoze Overlapped I/O
is when you get notified when a read or write has been completed. The
latter is, IMO, higher level stuff and can be implemented over the former
(and this is how I've been doing it in my projects).
I thought you guys were talking about the async model here.
-- Maxim Yegorushkin