Re: Where to declare/initialise an NSOperationQueue
Re: Where to declare/initialise an NSOperationQueue
- Subject: Re: Where to declare/initialise an NSOperationQueue
- From: Peter Blazejewicz <email@hidden>
- Date: Sat, 14 Feb 2009 10:57:24 +0100
hi Jacob,
Mike Ash has just posted blog entry on subject:
http://www.mikeash.com/?page=pyblog/friday-qa-2009-02-13-operations-based-parallelization.html
The answer depends on your code objectives,
Do you really need NSOperation instances and to queue them?
Maybe your task can be executed as single operation just executed in
background thread within your controller?
(performSelectorInBackgroundThread:withObject:)
regards,
Peter Blazejewicz
On Feb 14, 2009, at 7:49 AM, Jacob Rhoden wrote:
Hi Guys,
I have been starting to use NSOperationQueue. I have ended up with
one put in each controller (ie see below), but now I have one in too
many controllers. How does it work? Should I just have one global
variable for the operation queue, or do multiple NSOperationQueue's
"share" the same resources?
I guess I am looking for direction on how best to use it.
@interface WebsitesController : NSObject {
NSOperationQueue *operationQueue;
}
Thanks,
Jacob
_______________________________________________
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