Instance Method


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


func terminate()


If the task terminates as a result, which is the default behavior, an didTerminateNotification gets sent to the default notification center. This method has no effect if the receiver was already launched and has already finished executing. If the receiver has not been launched yet, this method raises an NSInvalidArgumentException.

It is not always possible to terminate the receiver because it might be ignoring the terminate signal. terminate() sends SIGTERM.

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.

func resume() -> Bool

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

func suspend() -> Bool

Suspends execution of the receiver task.

func waitUntilExit()

Block until the receiver is finished.