[RFC] [WIP] tevent/glib integration
nopower at suse.com
Mon Dec 28 11:06:36 UTC 2015
On 26/12/15 18:44, Ralph Boehme wrote:
> some more updates:
> We should use a GMainContext passed as argument to tevent/glib-init function.
didn't look, but having flexibility seems like a good idea
> The last patch modifies mdssvc to make use of the teven/glib
> integration. I've tested it with "rpc_server:mdssvc = embedded" (the
> default) and it works. :)
> There's one thing that won't work when integrating the glib event
> context(s) with tevent and that is being able to independently poll
> *multiple* glib GMainContexts.
yeah that was somewhat outside the scope I was looking at, I was trying
to emulate the basic case where generally you just run a single main
loop, in general I would expect nearly any glib enabled library to
support that mode of operation
> We use this in "rpc_daemon:mdssd =
> fork, rpc_server:mdssvc = external" when running the RPC service in a
> seperate process.
> With the current implementation we have one GMainContext per
> connection, so the mdssd process running the RPC service is able to
> isolate the client requests.
> In theory we could support multiple GMainContexts and maintain a list,
> but then we'd poll all contexts at one in tevent and that won't work.
hmm, I guess, I am not sure why you are using multiple GMainContexts but
I suppose you had good reason and needed to do this to circumvent the
problems of integrating with tevent in a 'custom' way, my gut feeling
would be you don't need to do this
> But I'm leaning towards dropping the context isolation in favor of a
> nicely integrated main tevent/glib loop.
hah yes, that's what I meant above
thanks Ralf again for looking
More information about the samba-technical