[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
guile-gtk 1.2 threads protection
From: |
Kevin Ryde |
Subject: |
guile-gtk 1.2 threads protection |
Date: |
Wed, 03 May 2006 12:03:19 +1000 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) |
I've realized that the bits I put in the guile-gtk-1.2 manual about
the interface using a mutex to protect an application from two threads
calling Gtk aren't right.
It was probably close enough in 1.6, with the threading there only
switching within a guile func. But in 1.8 the SCM_DEFER_INTS that I
had in mind certainly doesn't do the right thing.
One possibility would be to have guile-gtk functions put
gtk_threads_enter and gtk_threads_leave around each gtk/gdk call.
It'd probably want a recursive mutex since it might be nested within
application uses of gtk-threads-enter/leave. The pthreads has such
mutexes, but 1.6 would need extra code (unless it could be ommitted
there).
What does the gnome-gobject stuff do about thread protection?
At the moment I think I'll remove the offending bit from the manual
and worry later about something fancy in the code.
- guile-gtk 1.2 threads protection,
Kevin Ryde <=