tags:

views:

28

answers:

1

Hi, I made an application that is written in Cocoa and I happened to see how many threads it was using in Activity Monitor. It said 5. I did not use NSThread or any type of thread capability it registered as 5. Is this automatic?

+2  A: 

There are a number of different threads that can be set up automatically: one for animating certain UI elements (progress bars, pulsing buttons); one for rendering sounds; one or more for the garbage collector; one for managing Grand Central Dispatch queues (even if you don’t use GCD or NSOperation directly, some part of the framework might). Some of the threads have names, which are visible in the debugger and in crash reports.

In short, Cocoa and other frameworks are (to some extent) multithreaded, even if your app code isn’t.

Ahruman