Instance Method


Starts the receiver.


func start()


This method asynchronously spawns the new thread and invokes the receiver’s main() method on the new thread. The isExecuting property returns true once the thread starts executing, which may occur after the start() method returns.

If you initialized the receiver with a target and selector, the default main() method invokes that selector automatically.

If this thread is the first thread detached in the application, this method posts the NSWillBecomeMultiThreaded with object nil to the default notification center.

See Also

Starting a Thread

class func detachNewThreadSelector(Selector, toTarget: Any, with: Any?)

Detaches a new thread and uses the specified selector as the thread entry point.

func main()

The main entry point routine for the thread.

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