
Hello, I used boost thread library a lot and like it very much. Currently, I was reading the C++ Standerd proposal and saw that a thread (as well as boost::thread) does not have a priority. Which reason was it not to implement the thread priority in boost, and why is it not considered in the upcoming standard? I understand this feature is rarely required, but if someone suddenly needs to start a real-time priority thread he/she will be forced to use a third party lib again. Or is there smth. what I miss? Many thanks, Ovanes

On Feb 6, 2008, at 2:24 PM, Ovanes Markarian wrote:
Hello,
I used boost thread library a lot and like it very much. Currently, I was reading the C++ Standerd proposal and saw that a thread (as well as boost::thread) does not have a priority. Which reason was it not to implement the thread priority in boost, and why is it not considered in the upcoming standard? I understand this feature is rarely required, but if someone suddenly needs to start a real-time priority thread he/she will be forced to use a third party lib again. Or is there smth. what I miss?
I can answer the std::part. I attempted to introduce a fairly rudimentary priority system into the std::thread proposal and it ended up being sufficiently controversial that I pulled it in order to get the std::thread proposal to advance. It is my hope (as a fallback position) that the "native_handle" interface will allow one to adjust thread priorities, albeit in a non-portable fashion. -Howard

Thanks for your reply. That is really petty, that the standard will be
partially useful :( Is there any chance to get your ideas on handling thread
priorities? Should I may be move this discussion to the std-c++ list?
Many thanks,
Ovanes
On Feb 7, 2008 1:20 AM, Howard Hinnant
On Feb 6, 2008, at 2:24 PM, Ovanes Markarian wrote:
Hello,
I used boost thread library a lot and like it very much. Currently, I was reading the C++ Standerd proposal and saw that a thread (as well as boost::thread) does not have a priority. Which reason was it not to implement the thread priority in boost, and why is it not considered in the upcoming standard? I understand this feature is rarely required, but if someone suddenly needs to start a real-time priority thread he/she will be forced to use a third party lib again. Or is there smth. what I miss?
I can answer the std::part. I attempted to introduce a fairly rudimentary priority system into the std::thread proposal and it ended up being sufficiently controversial that I pulled it in order to get the std::thread proposal to advance. It is my hope (as a fallback position) that the "native_handle" interface will allow one to adjust thread priorities, albeit in a non-portable fashion.
-Howard
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

My recommendation would be to wait until the threading package appears in a WP draft (expected any day now). Then perhaps propose a rationale threading priority system (don't ask someone else to create one for you) on std-c++. And don't call anything petty. This area is fraught with emotion and one can just not be too diplomatic. I'd be happy to work with you on this. But I'm not sure I would actually be a help at this point. My name will come with preconceived assumptions because of my previous involvement over the years. You might be better off as a "fresh start". Be forewarned that things are already over- schedule. People are likely to shunt any new ideas off to TR2 no matter how great they are, just because it is so late in the game. My advice would be to state upfront any arguments you might have on targeting C++0X vs TR2, and accept targeting decisions of the committee gracefully. -Howard On Feb 6, 2008, at 7:31 PM, Ovanes Markarian wrote:
Thanks for your reply. That is really petty, that the standard will be partially useful :( Is there any chance to get your ideas on handling thread priorities? Should I may be move this discussion to the std-c++ list?
Many thanks, Ovanes
On Feb 7, 2008 1:20 AM, Howard Hinnant
wrote: On Feb 6, 2008, at 2:24 PM, Ovanes Markarian wrote: Hello,
I used boost thread library a lot and like it very much. Currently, I was reading the C++ Standerd proposal and saw that a thread (as well as boost::thread) does not have a priority. Which reason was it not to implement the thread priority in boost, and why is it not considered in the upcoming standard? I understand this feature is rarely required, but if someone suddenly needs to start a real-time priority thread he/she will be forced to use a third party lib again. Or is there smth. what I miss?
I can answer the std::part. I attempted to introduce a fairly rudimentary priority system into the std::thread proposal and it ended up being sufficiently controversial that I pulled it in order to get the std::thread proposal to advance. It is my hope (as a fallback position) that the "native_handle" interface will allow one to adjust thread priorities, albeit in a non-portable fashion.
-Howard
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

Thanks for your suggestions. I will do it this way. I was not going to ask
anybody on std c++ list to create threading priority. My thoughts were first
to see what you were going to suggest and understand why that was not
optimal for the standard and see afterwards if I can suggest anything better
at all. Such things are highly philosophical in their nature ;) and are hard
to design.
Thanks for your answers,
Ovanes
On Feb 7, 2008 1:42 AM, Howard Hinnant
My recommendation would be to wait until the threading package appears in a WP draft (expected any day now). Then perhaps propose a rationale threading priority system (don't ask someone else to create one for you) on std-c++. And don't call anything petty. This area is fraught with emotion and one can just not be too diplomatic. I'd be happy to work with you on this. But I'm not sure I would actually be a help at this point. My name will come with preconceived assumptions because of my previous involvement over the years. You might be better off as a "fresh start". Be forewarned that things are already over- schedule. People are likely to shunt any new ideas off to TR2 no matter how great they are, just because it is so late in the game. My advice would be to state upfront any arguments you might have on targeting C++0X vs TR2, and accept targeting decisions of the committee gracefully.
-Howard
On Feb 6, 2008, at 7:31 PM, Ovanes Markarian wrote:
Thanks for your reply. That is really petty, that the standard will be partially useful :( Is there any chance to get your ideas on handling thread priorities? Should I may be move this discussion to the std-c++ list?
Many thanks, Ovanes
On Feb 7, 2008 1:20 AM, Howard Hinnant
wrote: On Feb 6, 2008, at 2:24 PM, Ovanes Markarian wrote: Hello,
I used boost thread library a lot and like it very much. Currently, I was reading the C++ Standerd proposal and saw that a thread (as well as boost::thread) does not have a priority. Which reason was it not to implement the thread priority in boost, and why is it not considered in the upcoming standard? I understand this feature is rarely required, but if someone suddenly needs to start a real-time priority thread he/she will be forced to use a third party lib again. Or is there smth. what I miss?
I can answer the std::part. I attempted to introduce a fairly rudimentary priority system into the std::thread proposal and it ended up being sufficiently controversial that I pulled it in order to get the std::thread proposal to advance. It is my hope (as a fallback position) that the "native_handle" interface will allow one to adjust thread priorities, albeit in a non-portable fashion.
-Howard
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

Howard Hinnant schrieb:
I can answer the std::part. I attempted to introduce a fairly rudimentary priority system into the std::thread proposal and it ended up being sufficiently controversial that I pulled it in order to get the std::thread proposal to advance. It is my hope (as a fallback position) that the "native_handle" interface will allow one to adjust thread priorities, albeit in a non-portable fashion.
Is it likely Boost::Thread will get some support for this anytime soon? This "no-priority" thing is also keeping me back from switching some stuff over to Boost, as I wonder how you are supposed to spawn of a background-idle thread without priorities. The only cross-platform library that supports it is AFAIK Qt -- see http://doc.trolltech.com/4.4beta/qthread.html#start, which is quite handy. Cheers, Anteru

Anteru wrote:
Howard Hinnant schrieb:
I can answer the std::part. I attempted to introduce a fairly rudimentary priority system into the std::thread proposal and it ended up being sufficiently controversial that I pulled it in order to get the std::thread proposal to advance. It is my hope (as a fallback position) that the "native_handle" interface will allow one to adjust thread priorities, albeit in a non-portable fashion.
Is it likely Boost::Thread will get some support for this anytime soon? This "no-priority" thing is also keeping me back from switching some stuff over to Boost, as I wonder how you are supposed to spawn of a background-idle thread without priorities. The only cross-platform library that supports it is AFAIK Qt -- see http://doc.trolltech.com/4.4beta/qthread.html#start, which is quite handy.
Actually ACE also supports thread priorities in a cross-platform fashion -- see the spawn method: http://www.dre.vanderbilt.edu/Doxygen/Stable/ace/classACE__Thread__Manager.h... There's a change to boost.thread on the development branch somewhere to support priority that never got included on boost.thread once Bill K abandoned the project. You might go look for that in SVN and pull it into your version. Jeff
participants (4)
-
Anteru
-
Howard Hinnant
-
Jeff Garland
-
Ovanes Markarian