Boost.Thread and thread-priority
Hi, I have a question about thread priority in combination with Boost.Thread. I implemented a pool of threads that reads data-pkts from a work-queue in user-space. The main-thread receives data-packets from the kernel, copies them into user-space and places them in this data-queue. It is important that the kernel buffers do not overflow and therefor I thought raising the priority of the main-thread is a good idea. My question is would this *really* help? And how do I change priority with Boost.Thread? Cheers, Andrej
Hi Andrej, If I'm not mistaken, you use the thread::native_handle() function to call a platform specific API to change the thread priority. This means on Windows you need to use a Windows thread API function or on UNIX/Linux you use a POSIX thread API function using the value returned by the thread::native_handle() function. Regards, Leo -----Original Message----- From: Andrej van der Zee Sent: Tuesday, October 11, 2011 10:29 AM To: boost-users@lists.boost.org Subject: [Boost-users] Boost.Thread and thread-priority Hi, I have a question about thread priority in combination with Boost.Thread. I implemented a pool of threads that reads data-pkts from a work-queue in user-space. The main-thread receives data-packets from the kernel, copies them into user-space and places them in this data-queue. It is important that the kernel buffers do not overflow and therefor I thought raising the priority of the main-thread is a good idea. My question is would this *really* help? And how do I change priority with Boost.Thread? Cheers, Andrej _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Andrej van der Zee
-
Leo Carreon