Re: NSOperationQueue: -waitUntilAllOperationsAreFinished and -setSuspended:

2011-10-01 Thread Kyle Sluder
On Sat, Oct 1, 2011 at 3:44 PM, Quincey Morris wrote: > > Aren't you missing a [replyQueue setSuspended: NO] in there somewhere? And > if you do that, aren't you then failing to wait for backgroundQueue to > empty? Yes, sorry. The call to -setSuspended: happens right before -waitUntilAllOperation

Re: NSOperationQueue: -waitUntilAllOperationsAreFinished and -setSuspended:

2011-10-01 Thread Stevo Brock
What about removing replyQueue altogether, have the background operation add it's result processing back into backgroundQueue and just wait on backgroundQueue to finish? -Stevo On Oct 1, 2011, at 3:44 PM, Quincey Morris wrote: > On Oct 1, 2011, at 15:06 , Kyle Sluder wrote: > >> NSOperationQ

Re: NSOperationQueue: -waitUntilAllOperationsAreFinished and -setSuspended:

2011-10-01 Thread Quincey Morris
On Oct 1, 2011, at 15:06 , Kyle Sluder wrote: > NSOperationQueue backgroundQueue = /* some long-lived background queue */; > NSOperationQueue replyQueue = [NSOperationQueue new]; > int totalResult = 0; > > [replyQueue setSuspended:YES]; > > for (id foo in myFoos) { > [backgroundQueue addOperati

NSOperationQueue: -waitUntilAllOperationsAreFinished and -setSuspended:

2011-10-01 Thread Kyle Sluder
Hi all, Can't find an answer to this in the documentation. Does -waitUntilAllOperationsAreFinished pay heed to the -isSuspended state of the NSOperationQueue? I ask because I'm basically following this pattern to collect responses from multiple concurrent background operations in a thread-safe way