resumeExecution(withResult:)
If a successful, unmatched, invocation of Suspendexecution() has been made, resume the execution of the command.
Declaration
func resumeExecution(withResult result: Any?)Discussion
Resumes the execution of the command if a successful, unmatched, invocation of suspendExecution() has been made—otherwise, does nothing. The value for result is dependent on the segment of command execution that was suspended:
If suspendExecution() was invoked from within a command handler of one of the command’s receivers,
resultis considered to be the return value of the handler. Unless the command has received a scriptErrorNumber message with a nonzero error number, execution of the command will continue and the command handlers of other receivers will be invoked.If suspendExecution() was invoked from within an override of performDefaultImplementation() the result is treated as if it were the return value of the invocation of performDefaultImplementation().
resumeExecution(withResult:) may be invoked in any thread, not just the one in which the corresponding invocation of suspendExecution() occurred.