CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2011
    Posts
    1

    Cool 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

  2. #2
    Join Date
    Oct 2008
    Posts
    1,456

    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.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured