Type Method

sleep(until:)

Blocks the current thread until the time specified.

Declaration

class func sleep(until date: Date)

Parameters

aDate

The time at which to resume processing.

Discussion

No run loop processing occurs while the thread is blocked.

See Also

Stopping a Thread

class func sleep(forTimeInterval: TimeInterval)

Sleeps the thread for a given time interval.

class func exit()

Terminates the current thread.

func cancel()

Changes the cancelled state of the receiver to indicate that it should exit.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software