attempt to fix #39125

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37479 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2013-12-20 10:45:52 +00:00
parent 15e7c8f897
commit 19bee40b91
2 changed files with 14 additions and 1 deletions

View file

@ -1,3 +1,10 @@
2013-12-20 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSObject.m: initialise defaults system at end of NSObject
initialisation, in the hope of preventing deadlocks if the +initialize
methods of other classes in different threads try to use defaults.
May fix #39125
2013-12-20 Marcus Müller <znek@mulle-kybernetik.com>
* Headers/Foundation/NSStream.h: OSX compatibilityy ... use formal

View file

@ -46,6 +46,7 @@
#import "Foundation/NSThread.h"
#import "Foundation/NSNotification.h"
#import "Foundation/NSMapTable.h"
#import "Foundation/NSUserDefaults.h"
#import "GNUstepBase/GSLocale.h"
#ifdef HAVE_LOCALE_H
#include <locale.h>
@ -1131,7 +1132,7 @@ static id gs_weak_load(id obj)
*/
zombieClass = objc_lookUpClass("NSZombie");
/* Now that we have a workign autorelease system and working string
/* Now that we have a working autorelease system and working string
* classes we are able to set up notifications.
*/
[[NSNotificationCenter defaultCenter]
@ -1139,6 +1140,11 @@ static id gs_weak_load(id obj)
selector: @selector(_becomeMultiThreaded:)
name: NSWillBecomeMultiThreadedNotification
object: nil];
/* It is also safer to set upo the user defaults system before doing
* other stuff which might use it.
*/
[NSUserDefaults class];
}
return;
}