mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Minor reliability tweaks.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@20335 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
efccedf1e5
commit
fb3563bc50
3 changed files with 15 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
|||
2004-11-10 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSThread.m: Retain the notification center we use.
|
||||
* Source/NSNotificationCenter.m: Raise exception if anything
|
||||
tries to destroy the default center.
|
||||
|
||||
2004-11-04 Adrian Robert <arobert@cogsci.ucsd.edu>
|
||||
* Source/NSRunLoop.m (limitDateForMode:) Correction to housekeeper
|
||||
timer logic so event polling times out within reasonable time.
|
||||
|
|
|
@ -613,6 +613,11 @@ static NSNotificationCenter *default_center = nil;
|
|||
|
||||
- (void) gcFinalize
|
||||
{
|
||||
if (self == default_center)
|
||||
{
|
||||
[NSException raise: NSInternalInconsistencyException
|
||||
format: @"Attempt to destroy the default center"];
|
||||
}
|
||||
/*
|
||||
* Release all memory used to store Observations etc.
|
||||
*/
|
||||
|
|
|
@ -406,7 +406,7 @@ gnustep_base_thread_callback(void)
|
|||
*/
|
||||
if (nc == nil)
|
||||
{
|
||||
nc = [NSNotificationCenter defaultCenter];
|
||||
nc = RETAIN([NSNotificationCenter defaultCenter]);
|
||||
}
|
||||
[nc postNotificationName: NSWillBecomeMultiThreadedNotification
|
||||
object: nil
|
||||
|
@ -536,7 +536,7 @@ gnustep_base_thread_callback(void)
|
|||
*/
|
||||
if (nc == nil)
|
||||
{
|
||||
nc = [NSNotificationCenter defaultCenter];
|
||||
nc = RETAIN([NSNotificationCenter defaultCenter]);
|
||||
}
|
||||
[nc postNotificationName: NSThreadWillExitNotification
|
||||
object: t
|
||||
|
@ -716,7 +716,7 @@ gnustep_base_thread_callback(void)
|
|||
*/
|
||||
if (nc == nil)
|
||||
{
|
||||
nc = [NSNotificationCenter defaultCenter];
|
||||
nc = RETAIN([NSNotificationCenter defaultCenter]);
|
||||
}
|
||||
[nc postNotificationName: NSThreadDidStartNotification
|
||||
object: self
|
||||
|
@ -1172,7 +1172,7 @@ GSUnregisterCurrentThread (void)
|
|||
*/
|
||||
if (nc == nil)
|
||||
{
|
||||
nc = [NSNotificationCenter defaultCenter];
|
||||
nc = RETAIN([NSNotificationCenter defaultCenter]);
|
||||
}
|
||||
[nc postNotificationName: NSThreadWillExitNotification
|
||||
object: thread
|
||||
|
|
Loading…
Reference in a new issue