Re: Changes to the GLib main loop



Johannes Stezenbach <js convergence de> writes:

> Summary:
> - I need to add event sources to another thread's GMainContext.

Possible now:

 g_source_attach (source, g_main_context_get (other_thread));

[ The compat functions, g_io_add_watch, etc, always add to
  the default main context, not to the main context for
  the current thread ]

> - It would be nice if a g_io_add_watch() extension with a
>   GMainContext paramter existed.

Possible now:

  source = g_io_create_watch (channel, condition);
  g_source_attach (source, context);

> - It would be nice if I could create that GMainContext before
>   starting the other thread.

Not possible currently...

                                        Owen




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]