Re: autorelease: how does this work!? (if at all)
Re: autorelease: how does this work!? (if at all)
- Subject: Re: autorelease: how does this work!? (if at all)
- From: Jonny Taylor <email@hidden>
- Date: Fri, 18 Jun 2010 20:20:28 +0100
> 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 (email@hidden)
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:
This email sent to email@hidden