This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/60966] std::call_once sometime hangs
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 03 Jun 2014 17:59:29 +0000
- Subject: [Bug libstdc++/60966] std::call_once sometime hangs
- Auto-submitted: auto-generated
- References: <bug-60966-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60966
--- Comment #30 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Tue Jun 3 17:58:56 2014
New Revision: 211198
URL: http://gcc.gnu.org/viewcvs?rev=211198&root=gcc&view=rev
Log:
Backport from mainline
2014-05-16 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/60966
* include/std/future (__future_base::_State_baseV2::_M_set_result):
Signal condition variable after call_once returns.
(__future_base::_State_baseV2::_M_do_set): Do not signal here.
(promise::set_value, promise::set_exception): Increment the reference
count on the shared state until the function returns.
* testsuite/30_threads/promise/60966.cc: New.
Added:
branches/gcc-4_8-branch/libstdc++-v3/testsuite/30_threads/promise/60966.cc
Modified:
branches/gcc-4_8-branch/libstdc++-v3/ChangeLog
branches/gcc-4_8-branch/libstdc++-v3/include/std/future