guile-gtk-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: guile gnome gdk bindings question...no threads_init, threads_enter a


From: Andy Wingo
Subject: Re: guile gnome gdk bindings question...no threads_init, threads_enter and threads_exit definitions
Date: Mon, 18 Dec 2006 18:22:27 +0100

Hi Stan,

On Mon, 2006-12-18 at 15:10 +0100, Stan Pinte wrote:
> I recently discovered, thanks to this excellent article
> (http://aruiz.typepad.com/siliconisland/2006/04/threads_on_pygt.html)
> that I should use the functions gdk_threads_(init|enter|leave) to be
> able to run concurrent threads in a guile-gnome program, if these
> thread must interact with the GTK user interface.

I avoided threads in the bindings to Guile 1.6, the ones you have, as
the guile interpreter did not deal with them very well. If you want to
use threads, build the latest releases. You'll be happier.

Then you will find that dealing with threads and gtk is not particularly
nice; you either serialize all calls to gdk through a mutex (can be any
mutex, not just the one that gtk provides that we don't wrap, because
gtk itself does not use that mutex), or you only call gdk/gtk from one
thread. I prefer the last option.

Also you should note that the defs in defs/gnome/defs/ are generated;
they are tweaked and overriden by things in */gnome/overrides.

Regards,

Andy.
-- 
http://wingolog.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]