[pygtk] Does gobject.idle_add guarantee execution order?

Yuri Pimenov yuri.pimenov at gmail.com
Sat Dec 8 22:47:17 WST 2007


My way (not tested):

callables = [callable1,callable2, ...]

def dispatcher(callables, args):
    if len(callables):
        return callables.pop(0)(args)
    else:
         return False

args = dict()
gobject.idle_add(dispatcher, callables, args)

On 08/12/2007, Christopher Backhouse <cjbackhouse �� gmail.com> wrote:
> If I do something like
>
> gobject.idle_add(foo)
> gobject.idle_add(must_run_after_foo)
>
> Then am I guaranteed that these will indeed happen in the expected order?
> Would be good to know before I base quite a lot of my application on
> this assumption (using idle_add to mean "I need all this stuff to get
> done, and in order, but not right now, and not the exclusion of user
> events")
>
> Thanks

-- 
Yuri Pimenov


More information about the pygtk mailing list