1

In the NSThread documentation, I came across the method detachNewThreadSelector:toTarget:withObject:. What's the difference between that method and creating a thread with initWithTarget:selector:object: and then starting it with start?

skaffman
  • 398,947
  • 96
  • 818
  • 769
ryyst
  • 9,563
  • 18
  • 70
  • 97

1 Answers1

2

The only difference is that the second way gives you a reference to the NSThread object, so you can do things like set the stack size or priority before starting it, or use the isExecuting/Finished/Cancelled methods to check its status later.

smorgan
  • 20,228
  • 3
  • 47
  • 55