---
title: "init(block:)"
framework: foundation
role: symbol
role_heading: Initializer
path: "foundation/blockoperation/init(block:)"
---

# init(block:)

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

## Declaration

```swift
convenience init(block: @escaping @Sendable () -> Void)
```

## Parameters

- `block`: The block to add to the new block operation object’s list. The block should take no parameters and have no return value.

## Return Value

Return Value A new block operation object.

## See Also

### Related Documentation

- [Threading Programming Guide](apple-archive/documentation/Cocoa/Conceptual/Multithreading/Introduction.md)

### Managing the Blocks in the Operation

- [addExecutionBlock(_:)](foundation/blockoperation/addexecutionblock(_:).md)
- [executionBlocks](foundation/blockoperation/executionblocks.md)
