On 3 Oct 2013, at 20:14, Jens Alfke <j...@mooseyard.com> wrote:

> 
> On Oct 3, 2013, at 12:07 PM, Kyle Sluder <k...@ksluder.com> wrote:
> 
>> They're fundamentally different ways of doing multiprocessing.
> 
> So to use GCD I have to rip apart all of my code that uses threads/runloops 
> at once and rewrite it? (As I’ve said, I don’t mind upgrading it bit by bit 
> as I go; it’s the big-bang approach that scares me.)
> 
>> You _could_ have all your async queues target a serial queue that then
>> enqueues a bunch of blocks on a specific thread, but why?
> 
> I keep explaining this. So code that uses GCD APIs can coexist with code that 
> uses runloops.
> 
> (Even Apple hasn’t finished doing the conversion. Note that you cannot use 
> NSStream with GCD because its callbacks can only be scheduled on runloops, 
> not on queues. There are likely other APIs like this that I just haven’t run 
> into.)

It's probably worth noting that iOS 7 introduces CFStream APIs for doing 
exactly this. I've not tested it, but assume toll-free bridging continues to 
work here and you can apply it to NSStreams too.


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to