OS X Deployment Target: 10.11
Given an NSTask, that has an assigned qualityOfService what is the recommended way to be notified when the task exits (i.e. waitUntilExit) without blocking?
A NSBackgroundActivityScheduler.
- Assigned the same quality of service as that of the NSTask.
- Use scheduleWithBlock to waitUntilExit
- Finally, dispatch_async to the main queue and post a notification.
A dispatch_queue_t, using dispatch_get_global_queue.
- Switch on the quality of server of the NSTask to decide the QoS of the queue.
- dispatch_async a block to waitUntilExit
- Finally, dispatch_async to the main queue and post a notification.
Some other way?