Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: thread count problem



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@hidden
http://www.killerbytes.com/
(303) 722-0567 voice


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

References: 
 >thread count problem (From: Nick Rogers <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.