On Thu, January 14, 2010 21:22, JM wrote: > Hi all > Looks like closures and threads are incompatible right now. > This is the ccode generated from vala.
Of course. You can't just add 'owned' to a delegate parameter and think things will work -- it changes the corresponding C signature by adding the destroy notify callback. Now unfortunately neither g_thread_create NOR g_thread_create_full have destroy_notify function, so they CAN'T be bound with owned delegate. You'll have to keep the closure around yourself. I believe it makes sense to file a feature request against Glib to add a variant of g_thread_create with destroy notify, but of course it will take time before it gets to a stable release. -- - Jan Hudec <b...@ucw.cz> _______________________________________________ Vala-list mailing list Vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list