[RFC] [WIP] tevent/glib integration
rb at sernet.de
Thu Jan 28 14:08:41 UTC 2016
On Wed, Jan 27, 2016 at 04:14:46PM -0800, Jeremy Allison wrote:
> On Mon, Jan 11, 2016 at 12:18:53PM +0100, Ralph Boehme wrote:
> > Hm, that's a problem. Indeed, glib processes all pending event sources
> > while tevent just processes one, favouring immediate and signal events
> > over fds.
> > metze, is there a reason for only processing one pending event source
> > at a time in tevent?
> I can answer that - it's essential inside Samba use of
> The reason is that often an event callback has to
> schedule one or more immediate events that must be
> handled 'next' - before any other current pending
> Processing more than one pending event source means
> that requesting a tevent immediate from within a
> callback breaks the 'immediate' contract.
> The systemd event loop library does the same thing
> for much the same reasons.
> See here for details:
> "Then, to implement priorities fully, sd-event only
> dispatches a single event before going back to the
> kernel and asking for new events."
thanks! metze also pointed out in a private conversation, that another
obvious reason is that a handler may modify event sources including
destroying sources with pending events.
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
More information about the samba-technical