Skip navigation.
 
mlRe: thread count problem
FROM : Scott Ribe
DATE : Mon Apr 21 22:23:45 2008

1) What are you doing in the method you call from your detached thread?

Or

2) Don't worry, be happy.


There are a number of Cocoa features which will create a worker thread of
their own[1]. In other words, if you *never* explicitly create a thread,
you'll likely wind up with multiple threads anyway. And it's nothing to
worry about. I frankly don't know what all causes Cocoa to start another
thread for itself. (Perhaps performSelectorOnMainThread, if you don't wait
for completion, starts a thread that coordinates putting the call into the
main run loop?)

If you're really interested, I imagine that if you press for answers others
can provide info. But it really is nothing to worry about.

[1] Some probably more than one thread. For example, there are routines in
lower-level accelerated image processing libraries that will spawn multiple
threads on multi-core machines in order to process image slices in parallel.
I expect that some Cocoa image methods wind up calling down to those
routines.


--
Scott Ribe
<email_removed>
http://www.killerbytes.com/
(303) 722-0567 voice

Related mailsAuthorDate
mlthread count problem Nick Rogers Apr 21, 22:03
mlRe: thread count problem David Duncan Apr 21, 22:22
mlRe: thread count problem Scott Ribe Apr 21, 22:23
mlRe: thread count problem Navneet Kumar Apr 21, 22:25
mlRe: thread count problem Sean McBride Apr 21, 22:30