Re: gdk_threads_enter is not reentrant



Sebastian Wilhelmi <wilhelmi@ira.uka.de> writes:

> Having both (that is a recursive mutex, that can be fully released) seems like
> a good idea, but it really makes the interface bloated, it exposes the depth
> and makes things slower for all, without making it much better. I really am
> not sure, what to do. On one hand I agree with you, on the other hand I relly
> would like to have a lean and fast mutex in GLib. One solution might be to add
> a dedicated recursive mutex, that doesn't work with the g_mutex_lock etc.
> functions. But that's actually the way, it now is in GLib 1.3. Than we only
> would have to change the code in GTK+ to use that. I'll have a
> look. 

I was just about to suggest a dedicated recursive mutex. Dedicated
recursive mutexes seem cleaner to me. I am not sure if a depth counter
should be added to native recursive mutexes. It doesn't seem necessary
to me, but I may be wrong.

> Yes, I think I'll change my patch to make you and the other GTK+ users happy.
> 
> So please, everyone, disregard my last mail regarding the mutex change. I'll
> sit down and do it another way, leaving the native mutex untouched. 

Good idea!



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