CPU Affinity in Boost::Thread API
Hi,
Does anyone knows if it's possible to set CPU affinity in boost threads ((i.e. setting each thread to run on a different CPU)? Is there any tutorial/documentation you can suggest on this? Googling does not return much info except the following thread where the specified example (boost-bind_processor.v1.tar.gz) is no longer present in the file server. Thanks.
http://lists.boost.org/boost-users/2009/02/45172.php
Re: CPU Affinity in Boost::Thread API
I don't think there is a portable way of doing it; that said, you can always use the boost::thread::native_handle() member and your preferred OS api to set the affinity/proiority/etc.. of a thread.