Opened 14 years ago

Closed 12 years ago

#2740 closed Feature Requests (wontfix)

thread_group::size complexity

Reported by: viboes Owned by: Anthony Williams
Milestone: Boost 1.39.0 Component: thread
Version: Boost 1.37.0 Severity: Optimization
Keywords: thread_group Cc:

Description

The current implementation could have O(n) complexity due to the use of std::list. Even if we would have thread_group with no too many threads, it sounds extraneous to me to have a function size without constant complexity. As your implementation do not needs splice, what do you think about having a thread_group::size with constant complexity by adding an internal counter for example?

Change History (1)

comment:1 by viboes, 12 years ago

Resolution: wontfix
Status: newclosed

As discussed on the Boost ML, the number of threads in a group should be reduced, so the the cost of a linear size should be negligible. In addition the modification will add more complexity to the usual case.

So I don't think anymore this feature is interesting.

Note: See TracTickets for help on using tickets.