> First, the objects are retained by dispatch_async as others have mentioned.  
> Second, I'm not sure why you used 2 queues for the tasks in your code, seems 
> overly complex.  Async queues are serialized, which means that you can 
> continue to add to the queue and the jobs will be done in order which they 
> were added. The next job will not start until the previous one in the queue 
> is completed.   
Possibly overly complex, but notice that the nested block is running on *a 
different queue* to the block that spawns it. My intention is that the "write" 
queue (running the nested block) can have a write outstanding at all times, 
maximizing the rate at which data can be written to disk. To be fair the outer 
block does not strictly require a dedicated queue - it could probably run 
equally well on the global concurrent queue - but I don't think that's what 
you're commenting on is it?_______________________________________________

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

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

Reply via email to