locks in signal callbacks

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

 



hello!

i'm currently developing a multithreaded application which uses gtk+.
this application has beside the gtk+-lock some other mutexes which have
to be locked in a defined order to avoid deadlocks. in particular these
locks have to be obtained before a gtk+-lock.

now here are my questions:
as i learned, signal callbacks already have a gtk+-lock. so if i have
to obtain my application-specific locks, may i use the following
construct to avoid deadlocks?

g_threads_leave();
lock(my_mutex);
g_threads_enter();

or will this lead to trouble within the gtk-lib?

-- 
RY  Stefan
+-----------------+----------------+
| mail@xxxxxxxxxx | www.s-holst.de |
+-----------------+----------------+
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux