Opened 8 years ago
Closed 8 years ago
#10833 closed Feature Requests (wontfix)
boost::async should support auto scheduling (launch deferred)?
Reported by: | Owned by: | viboes | |
---|---|---|---|
Milestone: | To Be Determined | Component: | thread |
Version: | Boost 1.57.0 | Severity: | Problem |
Keywords: | Cc: |
Description
One of the design choices for std::async() default launch policy was to allow the OS scheduler to decide whether or not to launch a new thread or remain on the same thread (presumably based on available system resources). Boost::async() does not seem to support this default auto scheduling yet? It seems to be launching as many threads as tasks.
Change History (9)
comment:1 by , 8 years ago
comment:2 by , 8 years ago
Owner: | changed from | to
---|
comment:3 by , 8 years ago
This should be based on system load as determined by the OS. At least this is how Herb Sutter presented it in one of his talks, and how Scott Meyers claims it should work.
comment:5 by , 8 years ago
Effective Modern C++, item 35: "Your life will be easier if you dump these problems on somebody else, and using std::async does exactly that:
auto fut = std::async(doAsyncWork); onus of thread mgmt is on implementer of the Standard Library
This call shifts the thread management responsibility to the implementer of the C++ Standard Library...When it comes to load balancing, however, the runtime scheduler is likely to have a more comprehensive picture of what’s happening on the machine than you do, because it manages the threads from all processes, not just the one your code is running in.
comment:8 by , 8 years ago
Type: | Bugs → Feature Requests |
---|
comment:9 by , 8 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
What would be for you the criteria to switch to defer?