Oolite
Loading...
Searching...
No Matches
NSThread(OOExtensions) Category Reference

#include <NSThreadOOExtensions.h>

Class Methods

(void) + ooSetCurrentThreadName:

Detailed Description

Definition at line 33 of file NSThreadOOExtensions.h.

Method Documentation

◆ ooSetCurrentThreadName:

+ (void) ooSetCurrentThreadName: (NSString*) name

Definition at line 36 of file NSThreadOOExtensions.m.

36 :(NSString*)name
37{
38 // We may be called with no pool in place.
39 NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
40
41 [[NSThread currentThread] setName:name];
42
43#if OO_HAVE_PTHREAD_SETNAME_NP
44 /* Under Mac OS X 10.6, the name set by pthread_setname_np() is used in
45 crash reports, but, annoyingly, -[NSThread setName:] does not call it.
46 */
47 pthread_setname_np([name UTF8String]);
48#endif
49
50 [pool release];
51}

The documentation for this category was generated from the following files: