Re: receptionist pattern question: NSOperationQueue vs. GCD

2012-02-15 Thread Matt Neuburg
This might be another way of phrasing the same question: why does the new iOS 5 method +[NSURLConnection sendAsynchronousRequest:queue:completionHandler:] want an NSOperationQueue as its queue rather than a dispatch queue? m. -- matt neuburg, phd = m...@tidbits.com, http://www.apeth.net/matt/ pa

Re: receptionist pattern question: NSOperationQueue vs. GCD

2012-02-15 Thread Seth Willits
On Feb 15, 2012, at 11:19 AM, Matt Neuburg wrote: > My question is simply this: in a world that has GCD, is there any reason why > we wouldn't have "queue" be a GCD dispatch queue (probably the main queue) > and call dispatch_asynch? I don't believe there's any difference in this example. >

Re: receptionist pattern question: NSOperationQueue vs. GCD

2012-02-15 Thread Sean McBride
On Wed, 15 Feb 2012 11:19:49 -0800, Matt Neuburg said: >My question is simply this: in a world that has GCD, is there any reason >why we wouldn't have "queue" be a GCD dispatch queue (probably the main >queue) and call dispatch_asynch? Putting it even more generally (and >this is probably my *real

Re: receptionist pattern question: NSOperationQueue vs. GCD

2012-02-15 Thread Matt Neuburg
On Feb 15, 2012, at 12:53 PM, Sean McBride wrote: > Apple's always saying to use the highest level API available We must be watching different versions of the WWDC videos... :))) Backwards compatibility is a good reason on the desktop, but I'm on iOS and on iOS if you've got blocks you've got

Re: receptionist pattern question: NSOperationQueue vs. GCD

2012-02-15 Thread Mike Abdullah
Because it's a higher-level API answers pretty much all your questions. You have a little more easy flexibility with what you can do to an NSOperationQueue compared to raw GCD. To put it another way, what downside are you seeing to using NSOperationQueue? On 15 Feb 2012, at 19:32, Matt Neuburg

Re: receptionist pattern question: NSOperationQueue vs. GCD

2012-02-15 Thread Kyle Sluder
On Wed, Feb 15, 2012 at 11:19 AM, Matt Neuburg wrote: > My question is simply this: in a world that has GCD, is there any reason why > we wouldn't have "queue" be a GCD dispatch queue (probably the main queue) > and call dispatch_asynch? Putting it even more generally (and this is > probably my

Re: receptionist pattern question: NSOperationQueue vs. GCD

2012-02-15 Thread Preston Sumner
On Feb 15, 2012, at 12:32 PM, Matt Neuburg wrote: > This might be another way of phrasing the same question: why does the new iOS > 5 method +[NSURLConnection sendAsynchronousRequest:queue:completionHandler:] > want an NSOperationQueue as its queue rather than a dispatch queue? m. In OS X 10.6

Re: receptionist pattern question: NSOperationQueue vs. GCD

2012-02-16 Thread Matt Neuburg
On Wed, 15 Feb 2012 13:56:14 -0800, Kyle Sluder said: >On Wed, Feb 15, 2012 at 11:19 AM, Matt Neuburg wrote: >> My question is simply this: in a world that has GCD, is there any reason why >> we wouldn't have "queue" be a GCD dispatch queue (probably the main queue) >> and call dispatch_asynch?

RE: receptionist pattern question: NSOperationQueue vs. GCD

2012-02-16 Thread Julius Oklamcak
> On iOS, NSOperationQueue doesn't use GCD at all. Actually, posts by Apple people in the Developer Forums and the documentation differs on this: http://developer.apple.com/library/ios/#documentation/Cocoa/Reference/NSOper ationQueue_class/Reference/Reference.html "Note: In iOS 4 and later, oper

Re: receptionist pattern question: NSOperationQueue vs. GCD

2012-02-16 Thread Kyle Sluder
On Feb 16, 2012, at 8:09 AM, Matt Neuburg wrote: > On Wed, 15 Feb 2012 13:56:14 -0800, Kyle Sluder said: >> >> On iOS, NSOperationQueue doesn't use GCD at all. On Mac OS X 10.6 and >> greater, block-based NSOperations are submitted to global >> (asynchronous) dispatch queue. > > Very useful; t

Re: receptionist pattern question: NSOperationQueue vs. GCD

2012-02-16 Thread Matt Neuburg
On Feb 16, 2012, at 9:34 AM, Kyle Sluder wrote: > I must correct myself: NSOperationQueue uses GCD on iOS 4 and higher Good; I thought so, but you made me doubt it... :) m. -- matt neuburg, phd = m...@tidbits.com, http://www.apeth.net/matt/ pantes anthropoi tou eidenai oregontai phusei Programm