On Thu, May 29, 2008 at 05:40:16PM +0200, Valery Kholodkov wrote:
> Greetings!
> 
> Since discovering libevent for myself I've been wondering
> why where is still no support for Edge-Triggered behaviour, which
> from my point of view could be easily implemented.

Basically, because nobody had written it yet. Thanks for writing it! :)

   [...]
> The patch itself is submitted into SF's patch tracking system:
> 
> http://sourceforge.net/tracker/index.php?func=detail&aid=1968284&group_id=50884&atid=461324

Thanks for reminding me; I've just added a few questions there.

> This patch introduces EV_ET flag. Whenever you specify EV_ET in event_set
> call a specific module will try enforce Edge-Triggered behaviour.

Well, not exactly.  The way the patch is written now, when EV_ET is
set, *and* you're using the epoll backend or the kqueue backend,
you'll get edge-triggered behavior.  Otherwise, you get regular
behavior.  I'm not sure whether this is the right API or not; it might
make more sense for event_add to give an error when you try to add an
EV_ET event to a backend that doesn't support EV_ET.  Alternatively,
we could define the semantics of EV_ET so that instead of meaning
"make this event edge triggered" it means "make this event edge
triggered if possible."

(This is one of the comments on the sourceforge patch; I'm hoping we
can discuss this more there.  Niels: what do you think?)

 [...]
> I hope that maintainers will agree to integrate the patch in future
> versions of libevent.

I'd definitely like to merge functionality like this into Libevent
2.0.  The code looks clear enough, and the functionality certainly
seems valuable enough.

-- 
Nick
_______________________________________________
Libevent-users mailing list
Libevent-users@monkey.org
http://monkeymail.org/mailman/listinfo/libevent-users

Reply via email to