[Gtk-sharp-list] Problem with threaded GTK# Application on Windows

Rapha222 raphaeljavaux at gmail.com
Mon Feb 23 08:58:29 EST 2009




Jiří Zárevúcký wrote:
> 
> 2009/2/23 Rapha222 <raphaeljavaux at gmail.com>:
>>
>> GTK is thread safe, so you can't to modify Gtk Widgets from another
>> thread
>> that the thread which is running the MainLoop (Application.Run()), unless
>> if
>> you use Thread.Enter() and Thread.Leave() to stop the mainloop during the
>> modifications.
>>
> 
> 
> You can dispatch all changes to the main loop using Application.Invoke
> (). This is IMO the easiest way to work with Gtk in a multi-threaded
> application.
> _______________________________________________
> Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
> 
> 

Thanks, it's works now. I didn't know this method :-)

-- 
View this message in context: http://www.nabble.com/Problem-with-threaded-GTK--Application-on-Windows-tp21942601p22161972.html
Sent from the Mono - Gtk# mailing list archive at Nabble.com.



More information about the Gtk-sharp-list mailing list