Contents

Introduction

Explains how to implement concurrent code paths in an application.

Organization of This Document

This document contains the following chapters:

Concurrency and Application Design introduces the basics of asynchronous application design and the technologies for performing your custom tasks asynchronously.

Operation Queues shows you how to encapsulate and perform tasks using Objective-C objects.

Dispatch Queues shows you how to execute tasks concurrently in C-based applications.

Dispatch Sources shows you how to handle system events asynchronously.

Migrating Away from Threads provides tips and techniques for migrating your existing thread-based code over to use newer technologies.

This document also includes a glossary that defines relevant terms.

A Note About Terminology

Before entering into a discussion about concurrency, it is necessary to define some relevant terminology to prevent confusion. Developers who are more familiar with UNIX systems or older OS X technologies may find the terms “task”, “process”, and “thread” used somewhat differently in this document. This document uses these terms in the following way:

The term thread is used to refer to a separate path of execution for code. The underlying implementation for threads in OS X is based on the POSIX threads API.

The term process is used to refer to a running executable, which can encompass multiple threads.

The term task is used to refer to the abstract concept of work that needs to be performed.

For complete definitions of these and other key terms used by this document, see Glossary .

See Also

This document focuses on the preferred technologies for implementing concurrency in your applications and does not cover the use of threads. If you need information about using threads and other thread-related technologies, see Threading Programming Guide .

Next

Copyright © 2012 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2012-12-13