async NSOperation and NSOperationQueue
async NSOperation and NSOperationQueue
- Subject: async NSOperation and NSOperationQueue
- From: "Wayne Shao" <email@hidden>
- Date: Sun, 8 Jun 2008 17:26:12 -0700
I want to use NSOperationQueue to have at most 5 NSOperation running.
However, my operation is asynchronous.
>From the documentation:
If you are creating a concurrent operation, you need to override the
following methods:
-
start
-
isConcurrent
-
isExecuting
-
isFinished ( I will return YES after the operation callback is invoked)
In your start method, you must prepare the operation for execution, which
includes preparing the runtime environment for your operation. (For example,
if you wanted to create a thread yourself, you would do it here.)
So what exactly I should do in the start() method?? If I create a thread,
does the operation queue still enforce maxConcurrentOperationCount or I need
to worry about that in my implementation?
--
Wayne Shao
_______________________________________________
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