Invokes the passed-in block to avoid a deadlock if
perform is being invoked recursively.
- macOS 10.7+
The block to be invoked.
If a block that was passed to
perform is being invoked, this method invokes the passed-in block, having recorded state that makes inner invocations of
perform not wait. If this method is invoked outside of an invocation of a block passed to
perform, this method simply invokes the passed-in block.
This method is useful when code executed in a block passed to
perform may also invoke that method. For example,
save(with, which uses
perform, uses this around its invocation of
save(to: because both of those methods also use
perform. Without the use of this method the inner invocation of
perform would wait forever.