Re: [gtk-list] Re: gdk_threads_enter is not reentrant




Thanks Sebastian, I look forward to your changes.  One thing I should
mention: when you make gdk_threads_enter() reentrant, you should add
functions to release all locks no matter what depth you're at.
Consider this code:

    func1() {
	gdk_threads_enter();

	func2() {
	   gdk_threads_enter();

	   // I need to relase all GDK locks temporarily.
	   // gdk_thread_leave() won't do it since I'm two 
	   // locks deep
	   lock_depth = gdk_threads_leave_depth();

	   ...

	   gdk_threads_enter_depth(lock_depth);
	}
    }    

--Noel

IIRC?

> Date: Fri, 10 Mar 2000 14:44:56 +0000
> From: Sebastian Wilhelmi <wilhelmi@ira.uka.de>
> 
> Hi Noel,
> 
> > Thanks, Sebastian.  I just submitted a bug report.  
> 
> This bug indeed seems to be fixed in 1.2.7, IIRC.
> 
> > I could make the changes to glib myself and send you a diff if you like.
> 
> Thanks, but I'm just about to do something about it, 'cos I ain't happy with
> the way it currently is anyway.
> 
> Bye, 
> Sebastian
> -- 
> Sebastian Wilhelmi                   |            här ovanför alla molnen
> mailto:wilhelmi@ira.uka.de           |     är himmlen så förunderligt blå
> http://goethe.ira.uka.de/~wilhelmi   |
> 
> -- 
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
> 
> 



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