On Thu, Jul 28, 2011 at 11:05:02AM +0800, Nor Jaidi Tuah wrote:
> The code pasted below is from http://live.gnome.org/Vala/AsyncSamples.
> 
> My query is: is the code safe? 
> What will happen if the thread runs to completion
> before the main thread ever executes the yield?
> 
> The reason I'm asking is that currently I'm using a rather
> ugly way to wait (Timeout and yield inside a while(somevar))
> and the code below looks better. But I'm rather
> concerned about its safety.

Idle.add makes everything safe.

-- 
http://www.debian.org - The Universal Operating System
_______________________________________________
vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to