2 ms·
Note that OS X's thread affinity APIs, unlike other operating systems, don't allow to pin threads to specific processors. You can only define an "affinity set"
by cpeterso 11y ago
Note that OS X's thread affinity APIs, unlike other operating systems, don't allow to pin threads to specific processors. You can only define an "affinity set" of threads that should be scheduled on the same processor. Similarly, you can spread threads to different processors by assigning them to different affinity sets.
I wrote some code to do this in Firefox for OS X, Linux, and Windows: https://mxr.mozilla.org/mozilla-central/source/xpcom/threads/nsThread.cpp#302 https://mxr.mozilla.org/mozilla-central/source/xpcom/threads...
- deleted 11y ago[deleted]