1996-05-13 15:43:49 +00:00
|
|
|
/* Control of executable units within a shared virtual memory space
|
1996-02-13 15:40:05 +00:00
|
|
|
Copyright (C) 1996 Free Software Foundation, Inc.
|
|
|
|
|
1996-05-13 15:43:49 +00:00
|
|
|
Original Author: Scott Christley <scottc@net-community.com>
|
|
|
|
Rewritten by: Andrew McCallum <mccallum@gnu.ai.mit.edu>
|
|
|
|
Created: 1996
|
1996-02-13 15:40:05 +00:00
|
|
|
|
|
|
|
This file is part of the GNUstep Objective-C Library.
|
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
2007-09-14 11:36:11 +00:00
|
|
|
modify it under the terms of the GNU Lesser General Public
|
1996-02-13 15:40:05 +00:00
|
|
|
License as published by the Free Software Foundation; either
|
2008-06-08 10:38:33 +00:00
|
|
|
version 2 of the License, or (at your option) any later version.
|
1996-02-13 15:40:05 +00:00
|
|
|
|
|
|
|
This library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
Library General Public License for more details.
|
|
|
|
|
2007-09-14 11:36:11 +00:00
|
|
|
You should have received a copy of the GNU Lesser General Public
|
1996-02-13 15:40:05 +00:00
|
|
|
License along with this library; if not, write to the Free
|
2006-10-31 07:05:46 +00:00
|
|
|
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
|
|
Boston, MA 02111 USA.
|
1996-02-13 15:40:05 +00:00
|
|
|
*/
|
|
|
|
|
1996-05-13 15:43:49 +00:00
|
|
|
#ifndef __NSThread_h_GNUSTEP_BASE_INCLUDE
|
|
|
|
#define __NSThread_h_GNUSTEP_BASE_INCLUDE
|
2006-10-31 07:05:46 +00:00
|
|
|
#import <GNUstepBase/GSVersionMacros.h>
|
1996-02-13 15:40:05 +00:00
|
|
|
|
2010-02-18 16:18:54 +00:00
|
|
|
#if defined(GNUSTEP_BASE_INTERNAL)
|
|
|
|
#import "Foundation/NSAutoreleasePool.h" // for struct autorelease_thread_vars
|
|
|
|
#import "Foundation/NSException.h" // for NSHandler
|
|
|
|
#else
|
|
|
|
#import <Foundation/NSAutoreleasePool.h>
|
2006-10-31 07:05:46 +00:00
|
|
|
#import <Foundation/NSException.h>
|
2010-02-18 16:18:54 +00:00
|
|
|
#endif
|
1996-02-13 15:40:05 +00:00
|
|
|
|
2007-11-25 14:25:26 +00:00
|
|
|
@class NSArray;
|
2010-02-18 16:18:54 +00:00
|
|
|
@class NSDate;
|
|
|
|
@class NSMutableDictionary;
|
2007-11-25 14:25:26 +00:00
|
|
|
|
2006-09-13 10:20:49 +00:00
|
|
|
#if defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2008-03-18 05:45:05 +00:00
|
|
|
/**
|
|
|
|
* This class encapsulates OpenStep threading. See [NSLock] and its
|
|
|
|
* subclasses for handling synchronisation between threads.<br />
|
|
|
|
* Each process begins with a main thread and additional threads can
|
|
|
|
* be created using NSThread. The GNUstep implementation of OpenStep
|
|
|
|
* has been carefully designed so that the internals of the base
|
|
|
|
* library do not use threading (except for methods which explicitly
|
|
|
|
* deal with threads of course) so that you can write applications
|
|
|
|
* without threading. Non-threaded applications are more efficient
|
|
|
|
* (no locking is required) and are easier to debug during development.
|
|
|
|
*/
|
1996-02-13 15:40:05 +00:00
|
|
|
@interface NSThread : NSObject
|
|
|
|
{
|
2010-02-14 10:48:10 +00:00
|
|
|
#if GS_EXPOSE(NSThread)
|
|
|
|
@public
|
2000-04-19 12:32:38 +00:00
|
|
|
id _target;
|
|
|
|
id _arg;
|
|
|
|
SEL _selector;
|
2007-11-25 14:25:26 +00:00
|
|
|
NSString *_name;
|
2009-02-23 20:42:32 +00:00
|
|
|
NSUInteger _stackSize;
|
2007-11-25 14:25:26 +00:00
|
|
|
BOOL _cancelled;
|
2006-01-19 06:15:27 +00:00
|
|
|
BOOL _active;
|
2008-03-18 05:45:05 +00:00
|
|
|
BOOL _finished;
|
2007-12-25 20:31:24 +00:00
|
|
|
NSHandler *_exception_handler; // Not retained.
|
2000-04-19 12:32:38 +00:00
|
|
|
NSMutableDictionary *_thread_dictionary;
|
|
|
|
struct autorelease_thread_vars _autorelease_vars;
|
|
|
|
id _gcontext;
|
2008-03-03 08:31:10 +00:00
|
|
|
void *_runLoopInfo; // Per-thread runloop related info.
|
2010-03-02 09:51:12 +00:00
|
|
|
#endif
|
2011-02-16 05:49:45 +00:00
|
|
|
#if GS_NONFRAGILE
|
|
|
|
#else
|
2011-02-14 06:37:45 +00:00
|
|
|
/* Pointer to private additional data used to avoid breaking ABI
|
|
|
|
* when we don't have the non-fragile ABI available.
|
2011-02-16 05:49:45 +00:00
|
|
|
* Use this mechanism rather than changing the instance variable
|
|
|
|
* layout (see Source/GSInternal.h for details).
|
2011-02-14 06:37:45 +00:00
|
|
|
*/
|
2011-03-05 18:12:55 +00:00
|
|
|
@private id _internal GS_UNUSED_IVAR;
|
2011-02-14 06:37:45 +00:00
|
|
|
#endif
|
1996-02-13 15:40:05 +00:00
|
|
|
}
|
|
|
|
|
2008-03-18 05:45:05 +00:00
|
|
|
/**
|
|
|
|
* <p>
|
|
|
|
* Returns the NSThread object corresponding to the current thread.
|
|
|
|
* </p>
|
|
|
|
* <p>
|
|
|
|
* NB. In GNUstep the library internals use the GSCurrentThread()
|
|
|
|
* function as a more efficient mechanism for doing this job - so
|
|
|
|
* you cannot use a category to override this method and expect
|
|
|
|
* the library internals to use your implementation.
|
|
|
|
* </p>
|
|
|
|
*/
|
1996-05-13 15:43:49 +00:00
|
|
|
+ (NSThread*) currentThread;
|
2008-03-18 05:45:05 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* <p>Create a new thread - use this method rather than alloc-init. The new
|
|
|
|
* thread will begin executing the message given by aSelector, aTarget, and
|
|
|
|
* anArgument. This should have no return value, and must set up an
|
|
|
|
* autorelease pool if retain/release memory management is used. It should
|
|
|
|
* free this pool before it finishes execution.</p>
|
|
|
|
*/
|
1996-05-13 15:43:49 +00:00
|
|
|
+ (void) detachNewThreadSelector: (SEL)aSelector
|
1999-05-10 06:35:41 +00:00
|
|
|
toTarget: (id)aTarget
|
|
|
|
withObject: (id)anArgument;
|
2008-03-18 05:45:05 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Terminates the current thread.<br />
|
|
|
|
* Normally you don't need to call this method explicitly,
|
|
|
|
* since exiting the method with which the thread was detached
|
|
|
|
* causes this method to be called automatically.
|
|
|
|
*/
|
2002-08-27 17:02:05 +00:00
|
|
|
+ (void) exit;
|
2008-03-18 05:45:05 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns a flag to say whether the application is multi-threaded or not.<br />
|
|
|
|
* An application is considered to be multi-threaded if any thread other
|
|
|
|
* than the main thread has been started, irrespective of whether that
|
|
|
|
* thread has since terminated.<br />
|
|
|
|
* NB. This method returns YES if called within a handler processing
|
|
|
|
* <code>NSWillBecomeMultiThreadedNotification</code>
|
|
|
|
*/
|
1996-05-13 15:43:49 +00:00
|
|
|
+ (BOOL) isMultiThreaded;
|
|
|
|
+ (void) sleepUntilDate: (NSDate*)date;
|
2002-08-27 17:02:05 +00:00
|
|
|
|
|
|
|
- (NSMutableDictionary*) threadDictionary;
|
1996-02-13 15:40:05 +00:00
|
|
|
|
2008-03-17 15:23:11 +00:00
|
|
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_2,GS_API_LATEST) \
|
2009-09-12 07:37:00 +00:00
|
|
|
&& GS_API_VERSION( 10200,GS_API_LATEST)
|
2007-11-25 14:25:26 +00:00
|
|
|
+ (void) setThreadPriority: (double)pri;
|
|
|
|
+ (double) threadPriority;
|
|
|
|
#endif
|
|
|
|
|
2008-03-17 15:23:11 +00:00
|
|
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5,GS_API_LATEST) \
|
2009-09-12 07:37:00 +00:00
|
|
|
&& GS_API_VERSION( 11501,GS_API_LATEST)
|
2007-11-25 14:25:26 +00:00
|
|
|
|
|
|
|
/** Returns an array of the call stack return addresses.
|
|
|
|
*/
|
|
|
|
+ (NSArray*) callStackReturnAddresses;
|
|
|
|
|
2008-03-18 05:45:05 +00:00
|
|
|
/** Returns a boolean indicating whether this thread is the main thread of
|
|
|
|
* the process.
|
|
|
|
*/
|
|
|
|
+ (BOOL) isMainThread;
|
|
|
|
|
2007-11-25 14:25:26 +00:00
|
|
|
/** Returns the main thread of the process.
|
|
|
|
*/
|
|
|
|
+ (NSThread*) mainThread;
|
|
|
|
|
|
|
|
/** Suspends execution of the process for the specified period.
|
|
|
|
*/
|
|
|
|
+ (void) sleepForTimeInterval: (NSTimeInterval)ti;
|
|
|
|
|
|
|
|
/** Cancels the receiving thread.
|
|
|
|
*/
|
|
|
|
- (void) cancel;
|
|
|
|
|
2008-02-21 15:12:28 +00:00
|
|
|
/** <init/>
|
2007-11-25 14:25:26 +00:00
|
|
|
*/
|
|
|
|
- (id) init;
|
|
|
|
|
|
|
|
/** Initialises the receiver to send the message aSelector to the object aTarget
|
|
|
|
* with the argument anArgument (which may be nil).<br />
|
|
|
|
* The arguments aTarget and aSelector are retained while the thread is
|
|
|
|
* running.
|
|
|
|
*/
|
|
|
|
- (id) initWithTarget: (id)aTarget
|
|
|
|
selector: (SEL)aSelector
|
|
|
|
object: (id)anArgument;
|
|
|
|
|
|
|
|
/** Returns a boolean indicating whether the receiving
|
|
|
|
* thread has been cancelled.
|
|
|
|
*/
|
|
|
|
- (BOOL) isCancelled;
|
|
|
|
|
|
|
|
/** Returns a boolean indicating whether the receiving
|
|
|
|
* thread has been started (and has not yet finished or been cancelled).
|
|
|
|
*/
|
|
|
|
- (BOOL) isExecuting;
|
|
|
|
|
2008-03-18 05:45:05 +00:00
|
|
|
/** Returns a boolean indicating whether the receiving
|
|
|
|
* thread has completed executing.
|
|
|
|
*/
|
|
|
|
- (BOOL) isFinished;
|
|
|
|
|
2007-11-25 14:25:26 +00:00
|
|
|
/** Returns a boolean indicating whether this thread is the main thread of
|
|
|
|
* the process.
|
|
|
|
*/
|
|
|
|
- (BOOL) isMainThread;
|
|
|
|
|
2007-11-25 14:49:05 +00:00
|
|
|
/** FIXME ... what does this do?
|
|
|
|
*/
|
|
|
|
- (void) main;
|
|
|
|
|
2007-11-25 14:25:26 +00:00
|
|
|
/** Returns the name of the receiver.
|
|
|
|
*/
|
|
|
|
- (NSString*) name;
|
|
|
|
|
|
|
|
/** Sets the name of the receiver.
|
|
|
|
*/
|
|
|
|
- (void) setName: (NSString*)aName;
|
|
|
|
|
|
|
|
/** Sets the size of the receiver's stack.
|
|
|
|
*/
|
2009-02-23 20:42:32 +00:00
|
|
|
- (void) setStackSize: (NSUInteger)stackSize;
|
2007-11-25 14:25:26 +00:00
|
|
|
|
|
|
|
/** Returns the size of the receiver's stack.
|
|
|
|
*/
|
2009-02-23 20:42:32 +00:00
|
|
|
- (NSUInteger) stackSize;
|
2007-11-25 14:25:26 +00:00
|
|
|
|
|
|
|
/** Starts the receiver executing.
|
|
|
|
*/
|
|
|
|
- (void) start;
|
|
|
|
#endif
|
|
|
|
|
1996-02-13 15:40:05 +00:00
|
|
|
@end
|
|
|
|
|
2008-03-17 15:23:11 +00:00
|
|
|
/**
|
|
|
|
* Extra methods to permit messages to be sent to an object such that they
|
|
|
|
* are executed in <em>another</em> thread.<br />
|
|
|
|
* The main thread is the thread in which the GNUstep system is started,
|
|
|
|
* and where the GNUstep gui is used, it is the thread in which gui
|
|
|
|
* drawing operations <strong>must</strong> be performed.
|
|
|
|
*/
|
|
|
|
@interface NSObject(NSThreadPerformAdditions)
|
|
|
|
#if GS_API_VERSION(MAC_OS_X_VERSION_10_2, GS_API_LATEST)
|
|
|
|
/**
|
|
|
|
* <p>This method performs aSelector on the receiver, passing anObject as
|
|
|
|
* an argument, but does so in the main thread of the program. The receiver
|
|
|
|
* and anObject are both retained until the method is performed.
|
|
|
|
* </p>
|
|
|
|
* <p>The selector is performed when the runloop of the main thread next
|
|
|
|
* runs in one of the modes specified in anArray.<br />
|
|
|
|
* Where this method has been called more than once before the runloop
|
|
|
|
* of the main thread runs in the required mode, the order in which the
|
|
|
|
* operations in the main thread is done is the same as that in which
|
|
|
|
* they were added using this method.
|
|
|
|
* </p>
|
|
|
|
* <p>If there are no modes in anArray,
|
|
|
|
* the method has no effect and simply returns immediately.
|
|
|
|
* </p>
|
|
|
|
* <p>The argument aFlag specifies whether the method should wait until
|
|
|
|
* the selector has been performed before returning.<br />
|
|
|
|
* <strong>NB.</strong> This method does <em>not</em> cause the runloop of
|
|
|
|
* the main thread to be run ... so if the runloop is not executed by some
|
|
|
|
* code in the main thread, the thread waiting for the perform to complete
|
|
|
|
* will block forever.
|
|
|
|
* </p>
|
|
|
|
* <p>As a special case, if aFlag == YES and the current thread is the main
|
|
|
|
* thread, the modes array is ignored and the selector is performed immediately.
|
|
|
|
* This behavior is necessary to avoid the main thread being blocked by
|
|
|
|
* waiting for a perform which will never happen because the runloop is
|
|
|
|
* not executing.
|
|
|
|
* </p>
|
|
|
|
*/
|
2002-10-30 07:45:59 +00:00
|
|
|
- (void) performSelectorOnMainThread: (SEL)aSelector
|
|
|
|
withObject: (id)anObject
|
|
|
|
waitUntilDone: (BOOL)aFlag
|
|
|
|
modes: (NSArray*)anArray;
|
2008-03-17 15:23:11 +00:00
|
|
|
/**
|
|
|
|
* Invokes -performSelectorOnMainThread:withObject:waitUntilDone:modes:
|
|
|
|
* using the supplied arguments and an array containing common modes.<br />
|
2011-06-03 06:02:18 +00:00
|
|
|
* These modes consist of NSRunLoopMode, NSConnectionReplyMode, and if
|
2008-03-17 15:23:11 +00:00
|
|
|
* in an application, the NSApplication modes.
|
|
|
|
*/
|
2002-10-30 07:45:59 +00:00
|
|
|
- (void) performSelectorOnMainThread: (SEL)aSelector
|
|
|
|
withObject: (id)anObject
|
|
|
|
waitUntilDone: (BOOL)aFlag;
|
|
|
|
#endif
|
2008-03-17 15:23:11 +00:00
|
|
|
#if GS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
|
|
|
|
/**
|
|
|
|
* <p>This method performs aSelector on the receiver, passing anObject as
|
|
|
|
* an argument, but does so in the specified thread. The receiver
|
|
|
|
* and anObject are both retained until the method is performed.
|
|
|
|
* </p>
|
|
|
|
* <p>The selector is performed when the runloop of aThread next
|
|
|
|
* runs in one of the modes specified in anArray.<br />
|
|
|
|
* Where this method has been called more than once before the runloop
|
|
|
|
* of the thread runs in the required mode, the order in which the
|
|
|
|
* operations in the thread is done is the same as that in which
|
|
|
|
* they were added using this method.
|
|
|
|
* </p>
|
|
|
|
* <p>If there are no modes in anArray,
|
|
|
|
* the method has no effect and simply returns immediately.
|
|
|
|
* </p>
|
|
|
|
* <p>The argument aFlag specifies whether the method should wait until
|
|
|
|
* the selector has been performed before returning.<br />
|
|
|
|
* <strong>NB.</strong> This method does <em>not</em> cause the runloop of
|
|
|
|
* aThread to be run ... so if the runloop is not executed by some
|
|
|
|
* code in aThread, the thread waiting for the perform to complete
|
|
|
|
* will block forever.
|
|
|
|
* </p>
|
|
|
|
* <p>As a special case, if aFlag == YES and the current thread is aThread,
|
|
|
|
* the modes array is ignored and the selector is performed immediately.
|
|
|
|
* This behavior is necessary to avoid the current thread being blocked by
|
|
|
|
* waiting for a perform which will never happen because the runloop is
|
|
|
|
* not executing.
|
|
|
|
* </p>
|
|
|
|
*/
|
|
|
|
- (void) performSelector: (SEL)aSelector
|
|
|
|
onThread: (NSThread*)aThread
|
|
|
|
withObject: (id)anObject
|
|
|
|
waitUntilDone: (BOOL)aFlag
|
|
|
|
modes: (NSArray*)anArray;
|
|
|
|
/**
|
|
|
|
* Invokes -performSelector:onThread:withObject:waitUntilDone:modes:
|
|
|
|
* using the supplied arguments and an array containing common modes.<br />
|
|
|
|
* These modes consist of NSRunLoopMode, NSConnectionreplyMode, and if
|
|
|
|
* in an application, the NSApplication modes.
|
|
|
|
*/
|
|
|
|
- (void) performSelector: (SEL)aSelector
|
|
|
|
onThread: (NSThread*)aThread
|
|
|
|
withObject: (id)anObject
|
|
|
|
waitUntilDone: (BOOL)aFlag;
|
2013-08-12 08:56:18 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates and runs a new background thread sending aSelector to the receiver
|
|
|
|
* and passing anObject (which may be nil) as the argument.
|
|
|
|
*/
|
|
|
|
- (void) performSelectorInBackground: (SEL)aSelector
|
|
|
|
withObject: (id)anObject;
|
2008-03-17 15:23:11 +00:00
|
|
|
#endif
|
2013-10-18 02:00:54 +00:00
|
|
|
@end
|
|
|
|
|
|
|
|
@interface NSThread (CallStackSymbols)
|
|
|
|
#if GS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
|
|
|
|
/** Returns an array of NSString objects representing the current stack
|
|
|
|
* in an implementation-defined format. May return an empty array if
|
|
|
|
* this feature is not available.
|
|
|
|
*/
|
|
|
|
+ (NSArray *) callStackSymbols;
|
|
|
|
#endif
|
2008-03-17 15:23:11 +00:00
|
|
|
@end
|
2002-10-30 07:45:59 +00:00
|
|
|
|
2006-10-31 07:05:46 +00:00
|
|
|
#if GS_API_VERSION(GS_API_NONE, GS_API_NONE)
|
2000-11-12 07:41:24 +00:00
|
|
|
/*
|
2001-03-19 12:20:21 +00:00
|
|
|
* Don't use the following functions unless you really know what you are
|
2000-11-12 07:41:24 +00:00
|
|
|
* doing !
|
2001-03-19 12:20:21 +00:00
|
|
|
* The following functions are low-levelish and special.
|
2000-11-12 07:41:24 +00:00
|
|
|
* They are meant to make it possible to run GNUstep code in threads
|
|
|
|
* created in completely different environment, eg inside a JVM.
|
|
|
|
*
|
|
|
|
* If you use them, make sure you initialize the NSThread class inside
|
|
|
|
* (what you consider to be your) main thread, before registering any
|
|
|
|
* other thread. To initialize NSThread, simply call GSCurrentThread
|
|
|
|
* (). The main thread will not need to be registered.
|
|
|
|
*/
|
2001-03-19 12:20:21 +00:00
|
|
|
|
2000-11-12 07:41:24 +00:00
|
|
|
/*
|
|
|
|
* Register an external thread (created using your OS thread interface
|
|
|
|
* directly) to GNUstep. This means that it creates a NSThread object
|
|
|
|
* corresponding to the current thread, and sets things up so that you
|
|
|
|
* can run GNUstep code inside the thread. If the thread was not
|
2001-03-19 12:20:21 +00:00
|
|
|
* known to GNUstep, this function registers it, and returns YES. If
|
|
|
|
* the thread was already known to GNUstep, this function does nothing
|
2000-11-12 07:41:24 +00:00
|
|
|
* and returns NO. */
|
2001-03-19 12:20:21 +00:00
|
|
|
GS_EXPORT BOOL GSRegisterCurrentThread (void);
|
2000-11-12 07:41:24 +00:00
|
|
|
/*
|
|
|
|
* Unregister the current thread from GNUstep. You must only
|
2001-03-19 12:20:21 +00:00
|
|
|
* unregister threads which have been register using
|
|
|
|
* registerCurrentThread (). This method is basically the same as
|
2000-11-12 07:41:24 +00:00
|
|
|
* `+exit', but does not exit the thread - just destroys all objects
|
|
|
|
* associated with the thread. Warning: using any GNUstep code after
|
2001-03-19 13:15:10 +00:00
|
|
|
* this method call is not safe. Posts an NSThreadWillExit
|
2002-01-02 13:54:44 +00:00
|
|
|
* notification. */
|
2001-03-19 12:20:21 +00:00
|
|
|
GS_EXPORT void GSUnregisterCurrentThread (void);
|
2000-11-12 07:41:24 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Notification Strings.
|
|
|
|
* NSBecomingMultiThreaded and NSThreadExiting are defined for strict
|
|
|
|
* OpenStep compatibility, the actual notification names are the more
|
|
|
|
* modern OPENSTEP/MacOS versions.
|
|
|
|
*/
|
2004-07-29 15:30:47 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Notification posted the first time a new [NSThread] is created or a
|
|
|
|
* separate thread from another library is registered in an application.
|
2004-08-02 18:10:58 +00:00
|
|
|
* (The initial thread that a program starts with does <em>not</em>
|
|
|
|
* post this notification.) Before such a notification has been posted you
|
|
|
|
* can assume the application is in single-threaded mode and locks are not
|
|
|
|
* necessary. Afterwards multiple threads <em>may</em> be running.
|
2004-07-29 15:30:47 +00:00
|
|
|
*/
|
2004-09-19 23:19:53 +00:00
|
|
|
GS_EXPORT NSString* const NSWillBecomeMultiThreadedNotification;
|
1999-05-21 15:31:09 +00:00
|
|
|
#define NSBecomingMultiThreaded NSWillBecomeMultiThreadedNotification
|
2000-11-12 07:41:24 +00:00
|
|
|
|
2004-07-29 15:30:47 +00:00
|
|
|
/**
|
|
|
|
* Notification posted when an [NSThread] instance receives an exit message,
|
|
|
|
* or an external thread has been deregistered.
|
|
|
|
*/
|
2004-09-19 23:19:53 +00:00
|
|
|
GS_EXPORT NSString* const NSThreadWillExitNotification;
|
1999-05-21 15:31:09 +00:00
|
|
|
#define NSThreadExiting NSThreadWillExitNotification
|
1996-05-13 15:43:49 +00:00
|
|
|
|
2006-10-31 07:05:46 +00:00
|
|
|
#if GS_API_VERSION(GS_API_NONE, GS_API_NONE)
|
2000-11-12 07:41:24 +00:00
|
|
|
|
2004-07-29 15:30:47 +00:00
|
|
|
/**
|
2004-08-02 18:10:58 +00:00
|
|
|
* Notification posted whenever a new thread is started up. This is a
|
|
|
|
* GNUstep extension.
|
2004-07-29 15:30:47 +00:00
|
|
|
*/
|
2004-09-19 23:19:53 +00:00
|
|
|
GS_EXPORT NSString* const NSThreadDidStartNotification;
|
2000-11-12 07:41:24 +00:00
|
|
|
|
2010-02-18 16:18:54 +00:00
|
|
|
#endif
|
|
|
|
|
2010-02-20 17:16:23 +00:00
|
|
|
#if !NO_GNUSTEP
|
2010-02-18 16:18:54 +00:00
|
|
|
# if defined(GNUSTEP_BASE_INTERNAL)
|
|
|
|
# import "GNUstepBase/NSThread+GNUstepBase.h"
|
|
|
|
# else
|
|
|
|
# import <GNUstepBase/NSThread+GNUstepBase.h>
|
|
|
|
# endif
|
1999-04-19 14:29:52 +00:00
|
|
|
#endif
|
|
|
|
|
2006-09-13 10:20:49 +00:00
|
|
|
#if defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
1996-05-13 15:43:49 +00:00
|
|
|
#endif /* __NSThread_h_GNUSTEP_BASE_INCLUDE */
|