From 5d30f03b94350d6b9d10388b9383804e492f19e6 Mon Sep 17 00:00:00 2001 From: CaS Date: Sun, 3 Nov 2002 19:09:39 +0000 Subject: [PATCH] Improve documentation git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@14911 72102866-910b-0410-8b05-ffd578937521 --- Source/NSThread.m | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/Source/NSThread.m b/Source/NSThread.m index b0d138d68..9ea1192d9 100644 --- a/Source/NSThread.m +++ b/Source/NSThread.m @@ -778,8 +778,8 @@ static NSDate *theFuture; * an argument, but does so in the main thread of the program. The receiver * and anObject are both retained until the method is performed. *

- *

The selector is performed when the runloop of the main thread is in - * one of the modes specified in anArray, or if there are no modes in + *

The selector is performed when the runloop of the main thread next + * runs in one of the modes specified in anArray. if there are no modes in * anArray, the method has no effect and simply returns immediately. *

*

The argument aFlag specifies whether the method should wait until @@ -852,25 +852,21 @@ static NSDate *theFuture; /** * Invokes -performSelectorOnMainThread:withObject:waitUntilDone:modes: - * using the supplied arguments and an array containing common modes. + * using the supplied arguments and an array containing common modes.
+ * These modes consist of NSRunLoopMode, NSConnectionreplyMode, and if + * in an application, the NSApplication modes. */ - (void) performSelectorOnMainThread: (SEL)aSelector withObject: (id)anObject waitUntilDone: (BOOL)aFlag { - static NSArray *commonModes = nil; - - if (commonModes == nil) - { - commonModes = [[NSArray alloc] initWithObjects: - NSDefaultRunLoopMode, NSConnectionReplyMode, nil]; - } [self performSelectorOnMainThread: aSelector withObject: anObject waitUntilDone: aFlag - modes: commonModes]; + modes: commonModes()]; } @end + typedef struct { @defs(NSThread) } NSThread_ivars;