So this would mean that, if my callback function would have a sleep statement or some simple printf statements, an other event/callback function could be executed at the "same" time?
2010/4/19 Siddu <[email protected]> > > > On Sun, Apr 18, 2010 at 10:35 PM, R K <[email protected]> wrote: > >> Thanks Siddu. So does this mean that the next event will be dispatched as >> soon as the callback function of the current callback function returns? E.g. >> an event will not be interupted by another function? >> > > Yes , but it also depends upon the function calls you are making in the > callback function (whether they are synchronous calls or non synchronous > calls) > > if its synchronous calls .... its true with what you said > > if its async call , the next event will be immediately handled > > >> Rene >> >> 2010/4/18 Siddu <[email protected]> >> >> >>> >>> On Sun, Apr 18, 2010 at 7:48 PM, R K <[email protected]> wrote: >>> >>>> Hi all, >>>> >>>> I am trying to understand the way glib uses events when using >>>> g_main_loop_run(loop). >>>> This is how I understand it: >>>> >>>> The g_main_loop_run() function checks regulary if there are events that >>>> needs to be processed. The signal of an event is then executed by executing >>>> the callback function. What I don't understand is when a new event/callback >>>> function is executed. Is this when the first callback function is completed >>>> and then a next event is handled? Or is this when a event is dispatched by >>>> calling the callback function. Even when the callback function is not >>>> completed yet, another event can already be dispatched? >>>> >>>> I expect that multiple callback functions can be handled at the same >>>> time but that only one event at at time will be dispatched. >>>> >>>> Hi , >>> >>> its like the occurence of event will be followed by a look up in the >>> table as to which all functions have been registered as callback .... all >>> those functions will be dispatched ... and if any event occurs during the >>> execution of these callbacks they will be queued and handled in the next >>> turn ! >>> >>> Hopefully someone can clear this up for me a bit. >>>> >>>> Thanks! >>>> _______________________________________________ >>>> gtk-list mailing list >>>> [email protected] >>>> http://mail.gnome.org/mailman/listinfo/gtk-list >>>> >>>> >>> >>> >>> -- >>> Regards, >>> ~Sid~ >>> A little bird which escaped the nest had to fall before it learnt to fly >>> ! >>> >>> >> > > > -- > Regards, > ~Sid~ > A little bird which escaped the nest had to fall before it learnt to fly ! > >
_______________________________________________ gtk-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gtk-list
