blog vipa
mój dzień to 3 filiżanki kawy

blog vipa

Gtk is NOT thread safe

Maj 23rd, 2009 . by vip

Thanks. I’ve lost few days for searching bug. I didn’t know, that the signal sent from the Posix Thread and received by Gtk application isn’t executed in Gtk thread.

If you wan’t to write software, and you’re sure, you want to write it in C#/Gtk# (if not, choose Qt) and you will use threads, read http://mono-project.com/Responsive_Applications , which, at the end, brings simple solution:

[csharp]
if(Changed != null)
Gtk.Application.Invoke(delegate { Changed(„u”); });
[/csharp]

References:http://go-mono.com/forums/#nabble-td16363932|a16363932

Leave a Reply