[Gtk-sharp-list] How to stop an Idle Thread

Peter Johanson latexer at gentoo.org
Tue Feb 27 13:05:12 EST 2007


On Tue, Feb 27, 2007 at 06:01:40PM +0000, KLessou wrote:
>    Hello can we synchronize Glib.Idle Thread ?

<snip />

> 
>         // How to stop the previous Thread here ?
>         GLib.Idle.Add (new IdleHandler (OnIdleHello));

GLib.Idle.Add returns a uint value, which can later be removed with:

GLib.Source.Remove (my_uint);

That should do what you want.

-pete



More information about the Gtk-sharp-list mailing list