On Wed, 2008-09-24 at 21:45 +1000, Steve Smith wrote: > Thanks all for the help. Unfortunately I've tried this and idle() > doesn't really fix the problem as it effectively stops the main loop > from updating until it is complete.
yes, it's expected - GLib is not threaded, and the main loop is not firing up threads for each idle/timeout handler. > Unless there's a preemptible > version of idle() I'm probably going to have to uses threads for now. try breaking down the loading into smaller subsets, and return True at the end of the idle while the loading is in progress - and return False when it's done. if python has bindings for it, you can also try lowering the priority of the idle handler. if everything fails, you can use threads - but remember: you *cannot* update the UI from *any* thread; you can only call Clutter's API from the same thread that executed clutter.main(). the usual solution is to install an idle handler when the thread finished its job and in the idle handler call the Clutter API with the results of the loading done inside the thread. ciao, Emmanuele. -- Emmanuele Bassi, Intel Open Source Technology Center -- To unsubscribe send a mail to [EMAIL PROTECTED]
