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: How to limit number of CPU cores used by a Cocoa app



You can use the thread affinity tags. This will allow you to group threads together. I had to do this since Mac OS X is expensive when sharing common data across cpu dies.

Note that "thread" affinity is actually cache affinity in this API, which doesn't sound like what the OP wanted. I get the feeling he doesn't care what cores are used to run his threads, as long as no more than two are running simultaneously. If that's the case, I don't think there's any way to do that other than control your threads yourself.


Wade
_______________________________________________

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: 
 >How to limit number of CPU cores used by a Cocoa app (From: Andre Schnoor <email@hidden>)
 >Re: How to limit number of CPU cores used by a Cocoa app (From: Chris Hanson <email@hidden>)
 >Re: How to limit number of CPU cores used by a Cocoa app (From: Chris Driggett <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.