Blocks the current thread until all of the receiver’s queued and executing operations finish executing.
- iOS 2.0+
- macOS 10.5+
- tvOS 9.0+
- watchOS 2.0+
When called, this method blocks the current thread and waits for the receiver’s current and queued operations to finish executing. While the current thread is blocked, the receiver continues to launch already queued operations and monitor those that are executing. During this time, the current thread cannot add operations to the queue, but other threads may. Once all of the pending operations are finished, this method returns.
If there are no operations in the queue, this method returns immediately.