[Top][All Lists]

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

Deadlock in NSLog

From: David Chisnall
Subject: Deadlock in NSLog
Date: Fri, 1 Aug 2008 12:06:02 +0100


I've recently encountered a slightly strange problem with NSLog. It seems to be doing a lot of initialisation stuff the first time it's called. When NSLog is called first, simultaneously, from two threads, one of them gets deadlocked in GSPrivateDefaultLocale(), the other returns happily.

It appears that GNUstep is using the ObjC runtime mutex, which tries to emulate a recursive mutex using a non-recursive mutex. It looked like there was a potential for deadlock in here when I looked at the code a few months ago. Since GNUstep depends on pthreads anyway, it might be better to use the pthread functions directly, rather than going through a buggy abstraction layer.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]