[Sugar-devel] Is there a way to purposefully do synchronous GUI updates?

James Cameron quozl at laptop.org
Mon Aug 20 18:17:33 EDT 2012


On Tue, Aug 21, 2012 at 12:11:13AM +0530, Ajay Garg wrote:
> So, is there a way to have the code always in-order; in other words,
> have the GUI updates absolutely synchronous?

No, not without waiting for the update to complete, and if you do
this, the code runs very slowly.

(When there is only one CPU, only one process can execute on it at a
time.  The updates are placed in a pipeline to the display, and the
display process runs them as soon as it is practical to do so.  If
your process does not release the CPU, then your process will likely
continue executing until it hits something that will cause it to
release.  It is better to be specific and use idle_add to release.)

-- 
James Cameron
http://quozl.linux.org.au/


More information about the Sugar-devel mailing list