[Nice] API thoughts

Dafydd Harries dafydd.harries at collabora.co.uk
Tue Apr 15 16:33:38 PDT 2008


Ar 15/04/2008 am 13:24, ysgrifennodd Olivier Crête:
> 
> On Tue, 2008-04-15 at 18:14 +0300, Kai.Vehmanen at nokia.com wrote:
> > In principle this sounds good (in fact
> > 'agent.c:priv_attach_new_stream()'
> > already creates the GSources this way), but I'm a bit worried about 
> > how this works for clients which don't want to use different threads
> > for diffenrt stream/components.
> > 
> > Could we somehow support both models? Or is there a way to run
> > a set of GMainContexts in a single GMainloop (without writing
> > a custom GSource for this purpose)...?
> 
> Maybe we should have a function that takes a GMainContext as an argument
> (or NULL, in which case it would get the default one) and return a
> src_id for that context. With the proposed api, there is no way to
> disconnect a source.

We could make it return a GSource, and then you can attach it and detach it
from your main context.

-- 
Dafydd


More information about the Nice mailing list