O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

NSThread — Mac OS X 10.0

Synopsis

NSThread provides functionality to run processes as separate threads of execution. NSThread takes a method selector that will be run in its own thread. Threads share the memory space of their parent processes, unlike processes executed by NSTask instances.

image with no caption

@interface NSThread : NSObject
                                  // Convenience Constructors
   + (double)threadPriority;
                                  // Class Methods
   + (NSThread *)currentThread;
   + (void)detachNewThreadSelector:(SEL)selector 
                                 toTarget:(id)target 
                                 withObject:(id)argument;
   + (void)exit;
   + (BOOL)isMultiThreaded;
   + (BOOL)setThreadPriority:(double)priority;
   + (void)sleepUntilDate:(NSDate *)date;
                                  // Instance Methods
   - (NSMutableDictionary *)threadDictionary;

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required