[thread] feature request priority

Hi, here they are a list of 26 feature requests for Boost.Thread. The features are classified as high, middle and low cost (form my point of view of course) I would like to know which features would you like to find on the next release. Please could you choose 3 features and if possible one for each category, the idea been to provide 1 high, 1 middle and 2 low features for the next release. High #2100 <https://svn.boost.org/trac/boost/ticket/2100> thread fails to compile with -fno-exceptions <https://svn.boost.org/trac/boost/ticket/2100> #6195 <https://svn.boost.org/trac/boost/ticket/6195> Provide the standard time related interface using Boost.Chrono <https://svn.boost.org/trac/boost/ticket/6195> #6217 <https://svn.boost.org/trac/boost/ticket/6217> Make uniform Boost.Thread and Boost.Interprocess synchronization interface <https://svn.boost.org/trac/boost/ticket/6217> #6230 <https://svn.boost.org/trac/boost/ticket/6230> Follows the exception reporting mechanism as defined in the c++11 <https://svn.boost.org/trac/boost/ticket/6230> #5150 <https://svn.boost.org/trac/boost/ticket/5150> boost::thread does not print or return the error value when creating a thread fails. <https://svn.boost.org/trac/boost/ticket/5150> #6194 <https://svn.boost.org/trac/boost/ticket/6194> Adapt to Boost.Move <https://svn.boost.org/trac/boost/ticket/6194> Middle #2741 <https://svn.boost.org/trac/boost/ticket/2741> proposal to manage portable and non portable thread attributes <https://svn.boost.org/trac/boost/ticket/2741> #2880 <https://svn.boost.org/trac/boost/ticket/2880> Request for Thread scheduler support for boost .. <https://svn.boost.org/trac/boost/ticket/2880> #3696 <https://svn.boost.org/trac/boost/ticket/3696> Boost Thread library lacks any way to set priority of threads <https://svn.boost.org/trac/boost/ticket/3696> #4710 <https://svn.boost.org/trac/boost/ticket/4710> Missing async() <https://svn.boost.org/trac/boost/ticket/4710> #4725 <https://svn.boost.org/trac/boost/ticket/4725> Synchronization and shared mutex's Get total_count <https://svn.boost.org/trac/boost/ticket/4725> #5173 <https://svn.boost.org/trac/boost/ticket/5173> boost::this_thread::get_id is very slow <https://svn.boost.org/trac/boost/ticket/5173> #5425 <https://svn.boost.org/trac/boost/ticket/5425> This patch will allow the user to obtain the users thread pointer from a thread group. <https://svn.boost.org/trac/boost/ticket/5425> #5956 <https://svn.boost.org/trac/boost/ticket/5956> Add optional stack_size argument to thread::start_thread() <https://svn.boost.org/trac/boost/ticket/5956> #6227 <https://svn.boost.org/trac/boost/ticket/6227> Use of variadic templates on Generic Locking Algorithms on compilers providing them <https://svn.boost.org/trac/boost/ticket/6227> #6228 <https://svn.boost.org/trac/boost/ticket/6228> Add promise and futures constructor with allocator following the standard c++11 <https://svn.boost.org/trac/boost/ticket/6228> #6229 <https://svn.boost.org/trac/boost/ticket/6229> Rename the unique_future to future following the c++11 <https://svn.boost.org/trac/boost/ticket/6229> Low #1789 <https://svn.boost.org/trac/boost/ticket/1789> thread_group not passing variables <https://svn.boost.org/trac/boost/ticket/1789> #1850 <https://svn.boost.org/trac/boost/ticket/1850> request for unlock_guard (and/or unique_unlock) to compliment lock_guard/unique_lock <https://svn.boost.org/trac/boost/ticket/1850> #2361 <https://svn.boost.org/trac/boost/ticket/2361> thread_specific_ptr: nature of the key, complexity and rationale <https://svn.boost.org/trac/boost/ticket/2361> #2637 <https://svn.boost.org/trac/boost/ticket/2637> shared mutex lock <https://svn.boost.org/trac/boost/ticket/2637> #3567 <https://svn.boost.org/trac/boost/ticket/3567> Request for shared_lock_guard <https://svn.boost.org/trac/boost/ticket/3567> #6224 <https://svn.boost.org/trac/boost/ticket/6224> Add the use of standard noexcept on compilers supporting them <https://svn.boost.org/trac/boost/ticket/6224> #6225 <https://svn.boost.org/trac/boost/ticket/6225> Add the use of standard =delete defaulted operations on compilers supporting them <https://svn.boost.org/trac/boost/ticket/6225> #6226 <https://svn.boost.org/trac/boost/ticket/6226> add explicit bool conversion from locks <https://svn.boost.org/trac/boost/ticket/6226> #6231 <https://svn.boost.org/trac/boost/ticket/6231> Add BasicLockable requirements in the documentation to follow c++11 <https://svn.boost.org/trac/boost/ticket/6231> Patches are welcome for any feature. Note that a feature that have all the needed patches, code, doc and tests could be included soon. Thanks in advance, Vicente

Le 07/12/11 00:45, Vicente J. Botet Escriba a écrit :
Hi,
here they are a list of 26 feature requests for Boost.Thread. The features are classified as high, middle and low cost (form my point of view of course)
I would like to know which features would you like to find on the next release. Please could you choose 3 features and if possible one for each category, the idea been to provide 1 high, 1 middle and 2 low features for the next release.
High #2100 <https://svn.boost.org/trac/boost/ticket/2100> thread fails to compile with -fno-exceptions <https://svn.boost.org/trac/boost/ticket/2100> #6195 <https://svn.boost.org/trac/boost/ticket/6195> Provide the standard time related interface using Boost.Chrono <https://svn.boost.org/trac/boost/ticket/6195> #6217 <https://svn.boost.org/trac/boost/ticket/6217> Make uniform Boost.Thread and Boost.Interprocess synchronization interface <https://svn.boost.org/trac/boost/ticket/6217> #6230 <https://svn.boost.org/trac/boost/ticket/6230> Follows the exception reporting mechanism as defined in the c++11 <https://svn.boost.org/trac/boost/ticket/6230> #5150 <https://svn.boost.org/trac/boost/ticket/5150> boost::thread does not print or return the error value when creating a thread fails. <https://svn.boost.org/trac/boost/ticket/5150> #6194 <https://svn.boost.org/trac/boost/ticket/6194> Adapt to Boost.Move <https://svn.boost.org/trac/boost/ticket/6194>
Middle #2741 <https://svn.boost.org/trac/boost/ticket/2741> proposal to manage portable and non portable thread attributes <https://svn.boost.org/trac/boost/ticket/2741> #2880 <https://svn.boost.org/trac/boost/ticket/2880> Request for Thread scheduler support for boost .. <https://svn.boost.org/trac/boost/ticket/2880> #3696 <https://svn.boost.org/trac/boost/ticket/3696> Boost Thread library lacks any way to set priority of threads <https://svn.boost.org/trac/boost/ticket/3696> #4710 <https://svn.boost.org/trac/boost/ticket/4710> Missing async() <https://svn.boost.org/trac/boost/ticket/4710> #4725 <https://svn.boost.org/trac/boost/ticket/4725> Synchronization and shared mutex's Get total_count <https://svn.boost.org/trac/boost/ticket/4725> #5173 <https://svn.boost.org/trac/boost/ticket/5173> boost::this_thread::get_id is very slow <https://svn.boost.org/trac/boost/ticket/5173> #5425 <https://svn.boost.org/trac/boost/ticket/5425> This patch will allow the user to obtain the users thread pointer from a thread group. <https://svn.boost.org/trac/boost/ticket/5425> #5956 <https://svn.boost.org/trac/boost/ticket/5956> Add optional stack_size argument to thread::start_thread() <https://svn.boost.org/trac/boost/ticket/5956> #6227 <https://svn.boost.org/trac/boost/ticket/6227> Use of variadic templates on Generic Locking Algorithms on compilers providing them <https://svn.boost.org/trac/boost/ticket/6227> #6228 <https://svn.boost.org/trac/boost/ticket/6228> Add promise and futures constructor with allocator following the standard c++11 <https://svn.boost.org/trac/boost/ticket/6228> #6229 <https://svn.boost.org/trac/boost/ticket/6229> Rename the unique_future to future following the c++11 <https://svn.boost.org/trac/boost/ticket/6229>
Low #1789 <https://svn.boost.org/trac/boost/ticket/1789> thread_group not passing variables <https://svn.boost.org/trac/boost/ticket/1789> #1850 <https://svn.boost.org/trac/boost/ticket/1850> request for unlock_guard (and/or unique_unlock) to compliment lock_guard/unique_lock <https://svn.boost.org/trac/boost/ticket/1850> #2361 <https://svn.boost.org/trac/boost/ticket/2361> thread_specific_ptr: nature of the key, complexity and rationale <https://svn.boost.org/trac/boost/ticket/2361> #2637 <https://svn.boost.org/trac/boost/ticket/2637> shared mutex lock <https://svn.boost.org/trac/boost/ticket/2637> #3567 <https://svn.boost.org/trac/boost/ticket/3567> Request for shared_lock_guard <https://svn.boost.org/trac/boost/ticket/3567> #6224 <https://svn.boost.org/trac/boost/ticket/6224> Add the use of standard noexcept on compilers supporting them <https://svn.boost.org/trac/boost/ticket/6224> #6225 <https://svn.boost.org/trac/boost/ticket/6225> Add the use of standard =delete defaulted operations on compilers supporting them <https://svn.boost.org/trac/boost/ticket/6225> #6226 <https://svn.boost.org/trac/boost/ticket/6226> add explicit bool conversion from locks <https://svn.boost.org/trac/boost/ticket/6226> #6231 <https://svn.boost.org/trac/boost/ticket/6231> Add BasicLockable requirements in the documentation to follow c++11 <https://svn.boost.org/trac/boost/ticket/6231>
Patches are welcome for any feature. Note that a feature that have all the needed patches, code, doc and tests could be included soon.
Hi, as no one has any preference I will give mine: High #6194 Adapt to Boost.Move <https://svn.boost.org/trac/boost/ticket/6194> Middle #2741 proposal to manage portable and non portable thread attributes <https://svn.boost.org/trac/boost/ticket/2741> Low #1850 request for unlock_guard (and/or unique_unlock) to compliment lock_guard/unique_lock <https://svn.boost.org/trac/boost/ticket/1850> #3567 Request for shared_lock_guard <https://svn.boost.org/trac/boost/ticket/3567> Anthony, what do you think? Best, Vicente

Vicente J. Botet Escriba wrote:
here they are a list of 26 feature requests for Boost.Thread. The features are classified as high, middle and low cost (form my point of view of course)
I would like to know which features would you like to find on the next release. Please could you choose 3 features and if possible one for each category, the idea been to provide 1 high, 1 middle and 2 low features for the next release.
OK, here are my picks:
High #5150 <https://svn.boost.org/trac/boost/ticket/5150> boost::thread does not print or return the error value when creating a thread fails.
Middle #3696 <https://svn.boost.org/trac/boost/ticket/3696> Boost Thread library lacks any way to set priority of threads #5173 <https://svn.boost.org/trac/boost/ticket/5173> boost::this_thread::get_id is very slow
Low #1850 <https://svn.boost.org/trac/boost/ticket/1850> request for unlock_guard (and/or unique_unlock) to compliment lock_guard/unique_lock #2361 <https://svn.boost.org/trac/boost/ticket/2361> thread_specific_ptr: nature of the key, complexity and rationale
I know I picked to Middle-ranked issues, but both looked valuable. If I must choose, I'd prefer 5173 ATM. _____ Rob Stewart robert.stewart@sig.com Software Engineer using std::disclaimer; Dev Tools & Components Susquehanna International Group, LLP http://www.sig.com ________________________________ IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.

Le 21/12/11 20:02, Stewart, Robert a écrit :
Vicente J. Botet Escriba wrote:
here they are a list of 26 feature requests for Boost.Thread. The features are classified as high, middle and low cost (form my point of view of course)
I would like to know which features would you like to find on the next release. Please could you choose 3 features and if possible one for each category, the idea been to provide 1 high, 1 middle and 2 low features for the next release. OK, here are my picks:
High #5150<https://svn.boost.org/trac/boost/ticket/5150> boost::thread does not print or return the error value when creating a thread fails. Middle #3696<https://svn.boost.org/trac/boost/ticket/3696> Boost Thread library lacks any way to set priority of threads #5173<https://svn.boost.org/trac/boost/ticket/5173> boost::this_thread::get_id is very slow
Low #1850<https://svn.boost.org/trac/boost/ticket/1850> request for unlock_guard (and/or unique_unlock) to compliment lock_guard/unique_lock #2361<https://svn.boost.org/trac/boost/ticket/2361> thread_specific_ptr: nature of the key, complexity and rationale I know I picked to Middle-ranked issues, but both looked valuable. If I must choose, I'd prefer 5173 ATM. Hi,
thanks for your input even if you transgressed the rules ;-) I will take it in account in order to prioritize the feature requests. Respect to #5150<https://svn.boost.org/trac/boost/ticket/5150> boost::thread does not print or return the error value when creating a thread fails. I planed to implement it via #6230 <https://svn.boost.org/trac/boost/ticket/6230> Follows the exception reporting mechanism as defined in the c++11 and #3696 <https://svn.boost.org/trac/boost/ticket/3696> Boost Thread library lacks any way to set priority of threads via #2741 proposal to manage portable and non portable thread attributes <https://svn.boost.org/trac/boost/ticket/2741> What do you think? Best, Vicente

Vicente J. Botet Escriba wrote:
Respect to
#5150<https://svn.boost.org/trac/boost/ticket/5150> boost::thread does not print or return the error value when creating a thread fails.
I planed to implement it via
#6230 <https://svn.boost.org/trac/boost/ticket/6230> Follows the exception reporting mechanism as defined in the c++11
I presume by referring to #6230 that you'll throw an exception of type system_error for #5150's case. If so, I agree.
and #3696 <https://svn.boost.org/trac/boost/ticket/3696> Boost Thread library lacks any way to set priority of threads via
#2741 proposal to manage portable and non portable thread attributes <https://svn.boost.org/trac/boost/ticket/2741>
Using a thread_attributes class seems fine, but there are a few issues with #2741: 1. thread::thread_attributes makes for a redundant name. Either "thread_attributes" or "thread::attributes" would be better. 2. The constructors that take a thread_attributes argument should overload the existing constructors, not replace them. (The class definition in #2741 suggests the possibility of no backward compatibility, but I think that is important.) 3. You could support a portable interface for thread priorities, but you'd need to determine how to normalize thread priorities since different OSes offer different ranges of priority values. It might be that the portable interface provides only partial prioritization support for some platforms, requiring the use of a native API when that's insufficient. That would give some support for portable code, even if a modest utility that might be enough for many applications. Then again, the result might be so anemic that it would never be used. 4. I wonder if a thread should own its attributes such that clients can query for them later: thread_attributes const & thread::attributes() const; _____ Rob Stewart robert.stewart@sig.com Software Engineer using std::disclaimer; Dev Tools & Components Susquehanna International Group, LLP http://www.sig.com ________________________________ IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.

Stewart, Robert wrote
Vicente J. Botet Escriba wrote:
Respect to
#5150<https://svn.boost.org/trac/boost/ticket/5150> boost::thread does not print or return the error value when creating a thread fails.
I planed to implement it via
#6230 <https://svn.boost.org/trac/boost/ticket/6230> Follows the exception reporting mechanism as defined in the c++11
I presume by referring to #6230 that you'll throw an exception of type system_error for #5150's case. If so, I agree.
Yes.
and #3696 <https://svn.boost.org/trac/boost/ticket/3696> Boost Thread library lacks any way to set priority of threads via
#2741 proposal to manage portable and non portable thread attributes <https://svn.boost.org/trac/boost/ticket/2741>
Using a thread_attributes class seems fine, but there are a few issues with #2741:
1. thread::thread_attributes makes for a redundant name. Either "thread_attributes" or "thread::attributes" would be better.
OK.
2. The constructors that take a thread_attributes argument should overload the existing constructors, not replace them. (The class definition in #2741 suggests the possibility of no backward compatibility, but I think that is important.)
Yes, this is the case. The provided patch adds overloads without replacing the previous thread constructor..
3. You could support a portable interface for thread priorities, but you'd need to determine how to normalize thread priorities since different OSes offer different ranges of priority values. It might be that the portable interface provides only partial prioritization support for some platforms, requiring the use of a native API when that's insufficient. That would give some support for portable code, even if a modest utility that might be enough for many applications. Then again, the result might be so anemic that it would never be used.
My first intention was to provide the minimum, so that users are able to use the non-portable interface. I'm not sure we can provide a useful and portable interface for thread priorities, scheduling, .... The user could always define a class inheriting from thread_attributes and provide an interface that is portable for his application, which is less than requiring a portable interface in the generic sens. I will try to add an example in the documentation so that the user could find inspiration for his own application.
4. I wonder if a thread should own its attributes such that clients can query for them later:
thread_attributes const & thread::attributes() const;
The user can always associate the passed attributes to the thread either passing them as parameters or/and setting them as a thread specific pointer. I will try to add also an example. I will prefer to let this possibility for later development if there is a real need. Thanks for your comments, Vicente -- View this message in context: http://boost.2283326.n4.nabble.com/thread-feature-request-priority-tp4167017... Sent from the Boost - Dev mailing list archive at Nabble.com.

Vicente Botet wrote:
Stewart, Robert wrote
Vicente J. Botet Escriba wrote:
3. You could support a portable interface for thread priorities, but you'd need to determine how to normalize thread priorities since different OSes offer different ranges of priority values. It might be that the portable interface provides only partial prioritization support for some platforms, requiring the use of a native API when that's insufficient. That would give some support for portable code, even if a modest utility that might be enough for many applications. Then again, the result might be so anemic that it would never be used.
My first intention was to provide the minimum, so that users are able to use the non-portable interface. I'm not sure we can provide a useful and portable interface for thread priorities, scheduling, .... The user could always define a class inheriting from thread_attributes and provide an interface that is portable for his application, which is less than requiring a portable interface in the generic sens. I will try to add an example in the documentation so that the user could find inspiration for his own application.
That's a reasonable first step.
4. I wonder if a thread should own its attributes such that clients can query for them later:
thread_attributes const & thread::attributes() const;
The user can always associate the passed attributes to the thread either passing them as parameters or/and setting them as a thread specific pointer.
Yes and no. Consider thread_group: you can't easily associate the attributes with a thread, if you have access to a thread_group and not the code that called add_thread(). BTW, does the patch address creating threads, with attributes, via thread_group::create_thread()? _____ Rob Stewart robert.stewart@sig.com Software Engineer using std::disclaimer; Dev Tools & Components Susquehanna International Group, LLP http://www.sig.com ________________________________ IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.

Le 03/01/12 21:09, Stewart, Robert a écrit :
Vicente Botet wrote:
Stewart, Robert wrote
4. I wonder if a thread should own its attributes such that clients can query for them later:
thread_attributes const& thread::attributes() const; The user can always associate the passed attributes to the thread either passing them as parameters or/and setting them as a thread specific pointer. Yes and no. Consider thread_group: you can't easily associate the attributes with a thread, if you have access to a thread_group and not the code that called add_thread(). Maybe it would be better to provide some generic algorithms that work on generic containers. BTW, does the patch address creating threads, with attributes, via thread_group::create_thread()? No, the patch doesn't address thread group at all. The user could always create a thread and add it to the thread_group.
Vicente
participants (3)
-
Stewart, Robert
-
Vicente Botet
-
Vicente J. Botet Escriba