[RFC] [WIP] tevent/glib integration
jra at samba.org
Thu Jan 28 00:19:01 UTC 2016
On Fri, Jan 22, 2016 at 04:56:52PM +0100, Ralph Boehme wrote:
> Hi Noel,
> On Mon, Jan 11, 2016 at 12:56:12PM +0000, Noel Power wrote:
> > ... long snip ...
> ok, so we both agree that both solutions are ugly. ;)
> Metze had a better idea in a private conversation: use epoll to create
> an epoll instance and add the returned fd to tevent via
> tevent_add_fd(). Later add all glib fds to the new epoll instance via
> epoll_ctl(). epoll_wait() will then return all glib fds with events
> pending. This can all be done on top of tevent.
> In case epoll is not available, in the glue code as a fallback use a
> tevent_fd per glib fd and in the handler call poll() a second time on
> the glib fds. That way we get the raw revents and can handle all
> pending events in one swoop.
> This would work without any modifications to the tevent code.
Oh, that's a really nice way to do this !
+1 from me :-).
(Bit late to this conversation but trying to catch up :-).
More information about the samba-technical