]> git.ipfire.org Git - thirdparty/gcc.git/commit - libstdc++-v3/include/std/future
re PR libstdc++/60966 (std::call_once sometime hangs)
authorJonathan Wakely <redi@gcc.gnu.org>
Sat, 17 May 2014 12:58:46 +0000 (13:58 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Sat, 17 May 2014 12:58:46 +0000 (13:58 +0100)
commita0eaa08cebd801a6a1d340dfd71b0183c510f599
tree7237fcd1362424020b6b0b80fa7c6d219d31eb50
parent71ca302852481c082a944d5e58cd4821df5d8a6e
re PR libstdc++/60966 (std::call_once sometime hangs)

PR libstdc++/60966
* include/std/future (__future_base::_State_baseV2::_M_set_result):
Pass lock into _M_do_set and hold it until the function returns.
Signal condition variable after call_once completes.
(__future_base::_State_baseV2::_M_do_set): Use lock argument. Do not
signal here.
* testsuite/30_threads/promise/60966.cc: New.

From-SVN: r210556
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/future
libstdc++-v3/testsuite/30_threads/promise/60966.cc [new file with mode: 0644]