On Mar 10, 2008, at 10:08 PM, Nick Rogers wrote:

NSThread has one method:
+ (void)detachNewThreadSelector:(SEL)aSelector toTarget:(id)aTarget withObject:(id)anArgument

But its hard to understand as to how to implement it, since its a class method.


Don't let the fact that it's a class method scare you, just call it on the class object, like:

[NSThread detachNewThreadSelector:@selector(myMethod: toTarget: myClass withObject:nil];

Or, instead of nil,you can supply an object.

Apple actually does a darn good job documenting this whole process in the Threads Programming Guide:

http://developer.apple.com/documentation/Cocoa/Conceptual/Multithreading/Multithreading.pdf

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to