Defining a custom Operation object

There will be times when the default Operation object does not meet our needs completely. In such cases, we subclass it and add whatever is missing. The amount of work that this involves differs markedly between concurrent and non-concurrent operations.

For a concurrent operation, you must replace some of the existing infrastructure with your custom code. The following sections show you how to implement both types of object.

This is where we see the power of the Operation framework used more fully.

When we have a number of asynchronous calls being made, and the further execution of a process (in the broader sense) must wait until all those calls have completed, we need a way to keep track of which calls ...

Get Mastering macOS Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.