Processes and Threads

Manage your app's interaction with the host operating system and other processes, and implement low-level concurrency features.

Topics

Run Loop Scheduling

NSRunLoop

The programmatic interface to objects that manage input sources.

NSTimer

A timer that fires after a certain time interval has elapsed, sending a specified message to a target object.

Process Info

NSProcessInfo

A collection of information about the current process.

Threads and Locking

NSThread

A thread of execution.

NSLocking

The elementary methods adopted by classes that define lock objects.

NSLock

An object that coordinates the operation of multiple threads of execution within the same application.

NSRecursiveLock

A lock that may be acquired multiple times by the same thread without causing a deadlock.

NSDistributedLock

A lock that multiple applications on multiple hosts can use to restrict access to some shared resource, such as a file.

NSConditionLock

A lock that can be associated with specific, user-defined conditions.

NSCondition

A condition variable whose semantics follow those used for POSIX-style conditions.

Operations

NSOperationQueue

A queue that regulates the execution of operations.

NSOperation

An abstract class that represents the code and data associated with a single task.

NSBlockOperation

An operation that manages the concurrent execution of one or more blocks.

NSInvocationOperation

An operation that manages the execution of a single encapsulated task specified as an invocation.

Scripts and External Tasks

NSTask

An object representing a subprocess of the current process.

NSUserScriptTask

An object that executes scripts.

NSUserAppleScriptTask

An object that executes AppleScript scripts.

NSUserAutomatorTask

An object that executes Automator workflows.

NSUserUnixTask

An object that executes unix applications.

See Also

Low-Level Utilities

XPC

Manage secure interprocess communication.

Object Runtime

Get low-level support for basic Objective-C features, Cocoa design patterns, and Swift integration.

Streams, Sockets, and Ports

Use low-level Unix features to manage input and output among files, processes, and the network.