* [Bug libstdc++/49204] [C++0x] remaining issues in <future>
2011-05-28 0:32 [Bug libstdc++/49204] New: remaining issues in <future> redi at gcc dot gnu.org
@ 2011-05-28 0:41 ` redi at gcc dot gnu.org
2011-05-31 11:12 ` redi at gcc dot gnu.org
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: redi at gcc dot gnu.org @ 2011-05-28 0:41 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49204
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2011.05.28 00:31:49
Target Milestone|--- |4.7.0
Summary|remaining issues in |[C++0x] remaining issues in
|<future> |<future>
Ever Confirmed|0 |1
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/49204] [C++0x] remaining issues in <future>
2011-05-28 0:32 [Bug libstdc++/49204] New: remaining issues in <future> redi at gcc dot gnu.org
2011-05-28 0:41 ` [Bug libstdc++/49204] [C++0x] " redi at gcc dot gnu.org
@ 2011-05-31 11:12 ` redi at gcc dot gnu.org
2011-05-31 14:00 ` redi at gcc dot gnu.org
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: redi at gcc dot gnu.org @ 2011-05-31 11:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49204
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-05-31 10:52:17 UTC ---
also http://lwg.github.com/issues/lwg-active.html#2056
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/49204] [C++0x] remaining issues in <future>
2011-05-28 0:32 [Bug libstdc++/49204] New: remaining issues in <future> redi at gcc dot gnu.org
2011-05-28 0:41 ` [Bug libstdc++/49204] [C++0x] " redi at gcc dot gnu.org
2011-05-31 11:12 ` redi at gcc dot gnu.org
@ 2011-05-31 14:00 ` redi at gcc dot gnu.org
2011-12-23 16:13 ` redi at gcc dot gnu.org
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: redi at gcc dot gnu.org @ 2011-05-31 14:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49204
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-05-31 13:40:03 UTC ---
We should also make std::async check the system load when deciding whether to
run asynchronously or deferred. We should be able to reuse GNU Make's code for
deciding whether to run a new job or not, see load_too_high() in job.c
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/49204] [C++0x] remaining issues in <future>
2011-05-28 0:32 [Bug libstdc++/49204] New: remaining issues in <future> redi at gcc dot gnu.org
` (2 preceding siblings ...)
2011-05-31 14:00 ` redi at gcc dot gnu.org
@ 2011-12-23 16:13 ` redi at gcc dot gnu.org
2011-12-30 13:12 ` redi at gcc dot gnu.org
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: redi at gcc dot gnu.org @ 2011-12-23 16:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49204
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-12-23 16:10:58 UTC ---
Author: redi
Date: Fri Dec 23 16:10:48 2011
New Revision: 182658
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182658
Log:
PR libstdc++/49204
* include/std/future (future_errc): Implement LWG 2056.
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/std/future
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/49204] [C++0x] remaining issues in <future>
2011-05-28 0:32 [Bug libstdc++/49204] New: remaining issues in <future> redi at gcc dot gnu.org
` (3 preceding siblings ...)
2011-12-23 16:13 ` redi at gcc dot gnu.org
@ 2011-12-30 13:12 ` redi at gcc dot gnu.org
2012-01-02 17:56 ` redi at gcc dot gnu.org
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: redi at gcc dot gnu.org @ 2011-12-30 13:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49204
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-12-30 13:10:28 UTC ---
(In reply to comment #0)
> doesn't handle non-timed waiting functions, but I'm not convinced they
> should block.
Reported as http://cplusplus.github.com/LWG/lwg-active.html#2100
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/49204] [C++0x] remaining issues in <future>
2011-05-28 0:32 [Bug libstdc++/49204] New: remaining issues in <future> redi at gcc dot gnu.org
` (4 preceding siblings ...)
2011-12-30 13:12 ` redi at gcc dot gnu.org
@ 2012-01-02 17:56 ` redi at gcc dot gnu.org
2012-02-01 0:20 ` redi at gcc dot gnu.org
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: redi at gcc dot gnu.org @ 2012-01-02 17:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49204
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-01-02 17:56:19 UTC ---
(In reply to comment #2)
> We should also make std::async check the system load when deciding whether to
> run asynchronously or deferred. We should be able to reuse GNU Make's code for
> deciding whether to run a new job or not, see load_too_high() in job.c
It turns out that calling get_nprocs() (via
std::thread::hardware_concurrency()) and getloadavg() from several threads
concurrently is a really bad idea, so I'm working on a simple implementation
that just compares the number of active async jobs to the number of processors.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/49204] [C++0x] remaining issues in <future>
2011-05-28 0:32 [Bug libstdc++/49204] New: remaining issues in <future> redi at gcc dot gnu.org
` (5 preceding siblings ...)
2012-01-02 17:56 ` redi at gcc dot gnu.org
@ 2012-02-01 0:20 ` redi at gcc dot gnu.org
2012-02-01 0:25 ` redi at gcc dot gnu.org
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: redi at gcc dot gnu.org @ 2012-02-01 0:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49204
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-02-01 00:20:27 UTC ---
Author: redi
Date: Wed Feb 1 00:20:08 2012
New Revision: 183788
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=183788
Log:
PR libstdc++/49204
* include/std/future (__future_base::_State_base::wait()): Use lambda
expression for predicate and remove redundant test.
(__future_base::_State_base::wait_for()): Return future_status and
use lambda expression for predicate.
(__future_base::_State_base::wait_until()): Likewise.
(__basic_future::wait_for(), __basic_future::wait_until()): Likewise.
(__future_base::_Async_state): Replace with _Async_state_common
class for non-dependent functionality and _Async_state_impl class
template for dependent functionality.
(__future_base::_Async_state_common::_M_join): Serialize attempts to
join thread.
(__future_base::_Async_state_common::_M_run_deferred): Join.
(__future_base::_Async_state::_M_do_run): Replace with lambda.
* src/c++11/future.cc (__future_base::_Async_state_common): Define
destructor, so key function is in the library.
* config/abi/pre/gnu.ver: Add exports for ~_Async_state_common.
* testsuite/30_threads/packaged_task/members/get_future.cc: Expect
future_status return instead of bool.
* testsuite/30_threads/shared_future/members/wait_until.cc: Likewise.
* testsuite/30_threads/shared_future/members/wait_for.cc: Likewise.
* testsuite/30_threads/future/members/wait_until.cc: Likewise.
* testsuite/30_threads/future/members/wait_for.cc: Likewise.
* testsuite/30_threads/promise/members/set_value2.cc: Likewise.
* testsuite/30_threads/promise/members/set_value3.cc: Likewise.
* testsuite/30_threads/promise/members/swap.cc: Likewise.
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/config/abi/pre/gnu.ver
trunk/libstdc++-v3/include/std/future
trunk/libstdc++-v3/src/c++11/future.cc
trunk/libstdc++-v3/testsuite/30_threads/future/members/wait_for.cc
trunk/libstdc++-v3/testsuite/30_threads/future/members/wait_until.cc
trunk/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future.cc
trunk/libstdc++-v3/testsuite/30_threads/promise/members/set_value2.cc
trunk/libstdc++-v3/testsuite/30_threads/promise/members/set_value3.cc
trunk/libstdc++-v3/testsuite/30_threads/promise/members/swap.cc
trunk/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_for.cc
trunk/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_until.cc
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/49204] [C++0x] remaining issues in <future>
2011-05-28 0:32 [Bug libstdc++/49204] New: remaining issues in <future> redi at gcc dot gnu.org
` (6 preceding siblings ...)
2012-02-01 0:20 ` redi at gcc dot gnu.org
@ 2012-02-01 0:25 ` redi at gcc dot gnu.org
2012-02-03 9:22 ` redi at gcc dot gnu.org
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: redi at gcc dot gnu.org @ 2012-02-01 0:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49204
--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-02-01 00:25:31 UTC ---
Still outstanding tasks:
timed waiting functions do nto return future_status::deferred if the shared
state contains a deferred function (requires an additional virtual function to
be added to the vtable)
check system load when deciding whether to use async or deferred policy
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/49204] [C++0x] remaining issues in <future>
2011-05-28 0:32 [Bug libstdc++/49204] New: remaining issues in <future> redi at gcc dot gnu.org
` (7 preceding siblings ...)
2012-02-01 0:25 ` redi at gcc dot gnu.org
@ 2012-02-03 9:22 ` redi at gcc dot gnu.org
2012-08-22 19:20 ` redi at gcc dot gnu.org
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: redi at gcc dot gnu.org @ 2012-02-03 9:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49204
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.7.0 |4.8.0
--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-02-03 09:22:18 UTC ---
Not planning more work before 4.7.0
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/49204] [C++0x] remaining issues in <future>
2011-05-28 0:32 [Bug libstdc++/49204] New: remaining issues in <future> redi at gcc dot gnu.org
` (8 preceding siblings ...)
2012-02-03 9:22 ` redi at gcc dot gnu.org
@ 2012-08-22 19:20 ` redi at gcc dot gnu.org
2013-03-22 14:42 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: redi at gcc dot gnu.org @ 2012-08-22 19:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49204
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ABI
--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-08-22 19:20:19 UTC ---
(In reply to comment #7)
> timed waiting functions do nto return future_status::deferred if the shared
> state contains a deferred function (requires an additional virtual function to
> be added to the vtable)
setting ABI keyword as this can't be properly fixed without an incompatible
change
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/49204] [C++0x] remaining issues in <future>
2011-05-28 0:32 [Bug libstdc++/49204] New: remaining issues in <future> redi at gcc dot gnu.org
` (9 preceding siblings ...)
2012-08-22 19:20 ` redi at gcc dot gnu.org
@ 2013-03-22 14:42 ` jakub at gcc dot gnu.org
2013-03-23 15:02 ` redi at gcc dot gnu.org
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-03-22 14:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49204
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.8.0 |4.8.1
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-03-22 14:41:50 UTC ---
GCC 4.8.0 is being released, adjusting target milestone.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/49204] [C++0x] remaining issues in <future>
2011-05-28 0:32 [Bug libstdc++/49204] New: remaining issues in <future> redi at gcc dot gnu.org
` (10 preceding siblings ...)
2013-03-22 14:42 ` jakub at gcc dot gnu.org
@ 2013-03-23 15:02 ` redi at gcc dot gnu.org
2013-11-20 20:59 ` redi at gcc dot gnu.org
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: redi at gcc dot gnu.org @ 2013-03-23 15:02 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49204
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.8.1 |4.9.0
--- Comment #11 from Jonathan Wakely <redi at gcc dot gnu.org> 2013-03-23 15:01:56 UTC ---
I didn't get this done for 4.8 and it would be too invasive for 4.8.1 so
adjusting milestone
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/49204] [C++0x] remaining issues in <future>
2011-05-28 0:32 [Bug libstdc++/49204] New: remaining issues in <future> redi at gcc dot gnu.org
` (11 preceding siblings ...)
2013-03-23 15:02 ` redi at gcc dot gnu.org
@ 2013-11-20 20:59 ` redi at gcc dot gnu.org
2013-11-20 21:02 ` redi at gcc dot gnu.org
2015-05-05 2:00 ` redi at gcc dot gnu.org
14 siblings, 0 replies; 16+ messages in thread
From: redi at gcc dot gnu.org @ 2013-11-20 20:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49204
--- Comment #12 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Wed Nov 20 20:59:19 2013
New Revision: 205144
URL: http://gcc.gnu.org/viewcvs?rev=205144&root=gcc&view=rev
Log:
PR libstdc++/49204
* include/std/future (__future_base::_State_base): Rename to
__future_base::_State_baseV2.
(__future_base::_State_baseV2::~_State_baseV2): Define as defaulted.
(__future_base::_State_baseV2::_M_run_deferred): Rename to
_M_complete_async.
(__future_base::_State_baseV2::_M_has_deferred): Add new virtual.
(__future_base::_State_baseV2::wait_for): Call _M_has_deferred() to
test for a deferred function, or call _M_complete_async() to join an
async thread that has made the shared state ready.
(__future_base::_State_baseV2::wait_until): Likewise.
(__future_base::_Async_state_common): Rename to _Async_state_commonV2.
(__future_base::_Async_state_commonV2::_M_run_deferred): Rename to
_M_complete_async.
* src/c++11/compatibility-thread-c++0x.cc (__future_base::_State_base):
Export old definition.
(__future_base::_Async_state_common): Likewise.
* src/c++11/future.cc (__future_base::_State_base::~_State_base):
Remove.
* doc/xml/manual/status_cxx2011.xml: Update status.
* testsuite/30_threads/async/async.cc: Test future_status::timeout
and future_status::ready.
* testsuite/30_threads/async/sync.cc: Test future_status::deferred.
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/doc/xml/manual/status_cxx2011.xml
trunk/libstdc++-v3/include/std/future
trunk/libstdc++-v3/src/c++11/compatibility-thread-c++0x.cc
trunk/libstdc++-v3/src/c++11/future.cc
trunk/libstdc++-v3/testsuite/30_threads/async/async.cc
trunk/libstdc++-v3/testsuite/30_threads/async/sync.cc
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/49204] [C++0x] remaining issues in <future>
2011-05-28 0:32 [Bug libstdc++/49204] New: remaining issues in <future> redi at gcc dot gnu.org
` (12 preceding siblings ...)
2013-11-20 20:59 ` redi at gcc dot gnu.org
@ 2013-11-20 21:02 ` redi at gcc dot gnu.org
2015-05-05 2:00 ` redi at gcc dot gnu.org
14 siblings, 0 replies; 16+ messages in thread
From: redi at gcc dot gnu.org @ 2013-11-20 21:02 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49204
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|ABI |
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #13 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #7)
> Still outstanding tasks:
>
> timed waiting functions do nto return future_status::deferred if the shared
> state contains a deferred function (requires an additional virtual function
> to be added to the vtable)
This part is fixed for 4.9.0
> check system load when deciding whether to use async or deferred policy
PR 51617 covers that.
We're also missing all the "_at_thread_exit" throughout Clause 30, but I'm
going to resolve this PR as fixed.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libstdc++/49204] [C++0x] remaining issues in <future>
2011-05-28 0:32 [Bug libstdc++/49204] New: remaining issues in <future> redi at gcc dot gnu.org
` (13 preceding siblings ...)
2013-11-20 21:02 ` redi at gcc dot gnu.org
@ 2015-05-05 2:00 ` redi at gcc dot gnu.org
14 siblings, 0 replies; 16+ messages in thread
From: redi at gcc dot gnu.org @ 2015-05-05 2:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49204
Bug 49204 depends on bug 51617, which changed state.
Bug 51617 Summary: [C++0x] async(f) isn't.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51617
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 16+ messages in thread