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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.