I need to send multiple tasks to Grand Central Dispatch to run. Some tasks will finish first, while some will finish last.
How do I know all my tasks in Grand Central Dispatch finished?
Should I use a counter to record the number of tasks finished? Any smarter method?
You can use dispatch groups to be notified when all tasks completed. This is an example from http://cocoasamurai.blogspot.com/2009/09/guide-to-blocks-grand-central-dispatch.html