suspend()
Suspends the invocation of block objects on a dispatch object.
Declaration
func suspend()Discussion
By suspending a dispatch object, your application can temporarily prevent the execution of any blocks associated with that object. The suspension occurs after completion of any blocks running at the time of the call. Calling this function increments the suspension count of the object, and calling resume() decrements it. While the count is greater than zero, the object remains suspended, so you must balance each suspend() call with a matching resume() call.
Any blocks submitted to a dispatch queue or events observed by a dispatch source are delivered once the object is resumed.