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


@interface NSBlockOperation : NSOperation


The NSBlockOperation class is a concrete subclass of NSOperation 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.


Managing the Blocks in the Operation

+ blockOperationWithBlock:

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

- addExecutionBlock:

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


The blocks associated with the receiver.


Inherits From

See Also



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


A queue that regulates the execution of operations.


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

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software