[RFC] [WIP] tevent/glib integration
Jeremy Allison
jra at samba.org
Thu Jan 28 00:14:46 UTC 2016
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
tevent.
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
events.
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:
http://0pointer.net/blog/introducing-sd-event.html
"Then, to implement priorities fully, sd-event only
dispatches a single event before going back to the
kernel and asking for new events."
More information about the samba-technical
mailing list