A block of code invoked when a command buffer is scheduled for execution or has completed execution.
- iOS 8.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+
The completion handler takes the following parameters:
The command buffer that was scheduled or completed.
Scheduling and Executing Commands
Reserves a place for the command buffer on the associated command queue.
Commits the command buffer for execution.
Registers a block of code that Metal calls immediately after it schedules the command buffer for execution on the GPU.
Registers a block of code that Metal calls immediately after the GPU finishes executing the commands in the command buffer.
Blocks execution of the current thread until the command buffer is scheduled.
Blocks execution of the current thread until execution of the command buffer is completed.