NSOperation NSOperationQueue
NSOperation NSOperationQueue
- Subject: NSOperation NSOperationQueue
- From: Sandro Noel <email@hidden>
- Date: Wed, 24 Sep 2008 11:56:18 -0400
Greetings.
I need a clarification about the NSOpration ans NSOperationQueue
I read in the documentation that the NSOperation itself is non
concurrent.
and that i can program it to be, if I override this and that method.
and configure the runtime env.
I assume that means create my own threads(NSTasks).
But the NSOperationQueue can be set to execute X number of
NSOperations at the same time.
in fact you have to set a limit to this guy or else he executes all of
them at the same time.
when execute and look at my logs strings they are all mixed up as if
everything was running concurrently.
so is this the right assumption:)
If I use NSOperation, override only the main method, I get a non
concurrent object to run a particular piece of code.
Stack these lovely objects in an operationQueue and set
setMaxConcurrentOperationCount to 4.
The Queue itself is the one managing the concurrency. and I will have
4 operations runing at the same time?
thank you!
Sandro
_______________________________________________
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