Re: Main loop revision



Hi Owen,

> I've put up a proposal for a revision of the GLib main loop at:
> 
>  http://www.gtk.org/~otaylor/gtk/2.0/main-loop.html

Very nice writeup. It looks quite nice. As I didn't see the implementation, I
cannot say, whether the following will work (I would really like it to work):

Is it possible to add a fd to different GMainContexts, such that I could have
one Context with all my fds (think ORBit connections) and another Context with
all my fds and additionally some other stuff (think X11 connection). Now I can
either run the first Context (not dispatching X11 events, but only CORBA
"events") and I could run the other Context for dipatching both event-types?
That would be great (And it seems, I can do it, this is just to make sure).

>  - If g_main_run() is called from a different thread than
>    the thread for the main loop, then instead of failing
>    it waits for g_main_quit() by a mechanism such as
>    a semaphore

Can you still do 

while (g_main_pending(...)) g_main_iteration(...); 

in more than one tread or are you expected to use g_main_run?

Bye,
Sebastian

P.S.: Resent to the list. The first mail by mistake only went to Owen; Sorry.
-- 
Sebastian Wilhelmi                   |            här ovanför alla molnen
mailto:wilhelmi@ira.uka.de           |     är himmlen så förunderligt blå
http://goethe.ira.uka.de/~wilhelmi   |




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