Re: Question about NSThread
Re: Question about NSThread
- Subject: Re: Question about NSThread
- From: Jeff Kelley <email@hidden>
- Date: Thu, 14 Jul 2011 10:38:28 -0400
You *can*, but there is a limit to the number of threads you can create, and
even if you’re under the limit, you’ll likely be pegging the CPU in an
inefficient way. You would be better served using GCD and creating a
dispatch queue, then scheduling the task on that queue (or just using a
global queue).
Jeff Kelley
On Thu, Jul 14, 2011 at 10:08 AM, Eric E. Dolecki <email@hidden>wrote:
> I haven't done much research, but if I have a method that does a lot of
> looping, can I just safely bust this off (fire and forget)?
>
> [NSThread detachNewThreadSelector:@selector(generateBigData) toTarget:self
> withObject:nil];
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden