Instance Method

suspend()

Suspends execution of the receiver task.

Declaration

func suspend() -> Bool

Return Value

true if the receiver was successfully suspended, false otherwise.

Discussion

Multiple suspend() messages can be sent, but they must be balanced with an equal number of resume() messages before the task resumes execution.

See Also

Running and Stopping a Task

func interrupt()

Sends an interrupt signal to the receiver and all of its subtasks.

func launch()

Launches the task represented by the receiver.

Deprecated
func resume() -> Bool

Resumes execution of the receiver task that had previously been suspended with a suspend() message.

func terminate()

Sends a terminate signal to the receiver and all of its subtasks.

func waitUntilExit()

Block until the receiver is finished.