Question

Is it a good practice to have multiple NSOperationQueues? I currently am writing an application that has a NSOperationQueue that kicks off multiple NSOperations. Each operation then starts its own queue and executes its own separate NSOperations. I don't have any issues with this model so far and everything is operating as it is supposed to (I'm not experiencing any deadlock).

Is that considered a good practice? Is there a point where you have too many NSOperationQueues?

Was it helpful?

Solution

The best is use GCD global queues IMO ;) the OS knows how many queues is best :D But You can have multiple queues.. the OS won't break if you use some

But seriously:

How many highly depends not only on the OS also on what they would be doing! (CPU only, IO? ...)

there is no real exact number.

Use what you need, feel comfortable with and what makes sense semantically(!)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top