<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.6.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/BlockOperation",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSBlockOperation"
  },
  "title" : "BlockOperation"
}
-->

# BlockOperation

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

```
class BlockOperation
```

## Overview

The [`BlockOperation`](/documentation/Foundation/BlockOperation) class is a concrete subclass of [`Operation`](/documentation/Foundation/Operation) that manages the concurrent execution of one or more blocks. You can use this object to execute several blocks at once without having to create separate operation objects for each. When executing more than one block, the operation itself is considered finished only when all blocks have finished executing.

Blocks added to a block operation are dispatched with default priority to an appropriate work queue. The blocks themselves should not make any assumptions about the configuration of their execution environment.

For more information about blocks, see [Blocks Programming Topics](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/Blocks/Articles/00_Introduction.html#//apple_ref/doc/uid/TP40007502).

## Topics

### Managing the Blocks in the Operation

[`init(block:)`](/documentation/Foundation/BlockOperation/init(block:))

Creates and returns an `NSBlockOperation` object and adds the specified block to it.

[`addExecutionBlock(_:)`](/documentation/Foundation/BlockOperation/addExecutionBlock(_:))

Adds the specified block to the receiver’s list of blocks to perform.

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

The blocks associated with the receiver.



---

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)
