locks in signal callbacks



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 s-holst de | www.s-holst.de |
+-----------------+----------------+



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