• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to limit number of CPU cores used by a Cocoa app
[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


  • Subject: Re: How to limit number of CPU cores used by a Cocoa app
  • From: Andre Schnoor <email@hidden>
  • Date: Sun, 30 Dec 2007 13:33:07 +0100

Chris Driggett wrote:
Andre,
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.


Here is the link to the apple doc.

http://developer.apple.com/releasenotes/Performance/RN-AffinityAPI/index.html


Thanks. If I got it right, I can assign the same non-null affinity tag to all threads and they will be run on the same CPU package, just like on a Core 2 Duo. This should do it.


Obviously there's no way to set the affinity tag for a thread that is already running. How is one supposed to set the affinity tag of a thread that is about to be started with #detachNewThreadSelector:toTarget:withObject: or even for the main thread? I assume this is impossible.

Andre


_______________________________________________

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:
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>)

  • Prev by Date: Very strange problem about "setString" method of NSTextView.
  • Next by Date: Link (dyld) error: bad external relocation length
  • Previous by thread: Re: How to limit number of CPU cores used by a Cocoa app
  • Next by thread: Re: How to limit number of CPU cores used by a Cocoa app
  • Index(es):
    • Date
    • Thread