<!--
{
  "documentType" : "article",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/processes-and-threads",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Processes and Threads"
}
-->

# 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

[`RunLoop`](/documentation/Foundation/RunLoop)

The programmatic interface to objects that manage input sources.

[`Timer`](/documentation/Foundation/Timer)

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

### Process Info

[`ProcessInfo`](/documentation/Foundation/ProcessInfo)

A collection of information about the current process.

### Threads and Locking

[`Thread`](/documentation/Foundation/Thread)

A thread of execution.

[`NSLocking`](/documentation/Foundation/NSLocking)

The elementary methods adopted by classes that define lock objects.

[`NSLock`](/documentation/Foundation/NSLock)

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

[`NSRecursiveLock`](/documentation/Foundation/NSRecursiveLock)

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

[`NSDistributedLock`](/documentation/Foundation/NSDistributedLock)

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

[`NSConditionLock`](/documentation/Foundation/NSConditionLock)

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

[`NSCondition`](/documentation/Foundation/NSCondition)

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

### Operations

[`OperationQueue`](/documentation/Foundation/OperationQueue)

A queue that regulates the execution of operations.

[`Operation`](/documentation/Foundation/Operation)

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

[`BlockOperation`](/documentation/Foundation/BlockOperation)

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

[`NSInvocationOperation`](/documentation/Foundation/NSInvocationOperation)

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

### Scripts and External Tasks

[`Process`](/documentation/Foundation/Process)

An object that represents a subprocess of the current process.

[`NSUserScriptTask`](/documentation/Foundation/NSUserScriptTask)

An object that executes scripts.

[`NSUserAppleScriptTask`](/documentation/Foundation/NSUserAppleScriptTask)

An object that executes AppleScript scripts.

[`NSUserAutomatorTask`](/documentation/Foundation/NSUserAutomatorTask)

An object that executes Automator workflows.

[`NSUserUnixTask`](/documentation/Foundation/NSUserUnixTask)

An object that executes unix applications.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)