Submits a block object for execution on a dispatch queue and waits until that block completes.
- iOS 4.0+
- macOS 10.6+
- tvOS 9.0+
- watchOS 2.0+
The queue on which to submit the block. This parameter cannot be
The block to be invoked on the target dispatch queue. This parameter cannot be
Submits a block to a dispatch queue for synchronous execution. Unlike
dispatch_async, this function does not return until the block has finished. Calling this function and targeting the current queue results in deadlock.
dispatch_async, no retain is performed on the target queue. Because calls to this function are synchronous, it "borrows" the reference of the caller. Moreover, no
Block_copy is performed on the block.
As an optimization, this function invokes the block on the current thread when possible.