This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/58038] std::this_thread::sleep_until can cause inifinite sleep
- 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: Thu, 26 Mar 2015 19:59:40 +0000
- Subject: [Bug libstdc++/58038] std::this_thread::sleep_until can cause inifinite sleep
- Auto-submitted: auto-generated
- References: <bug-58038-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58038
--- Comment #10 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Thu Mar 26 19:59:08 2015
New Revision: 221708
URL: https://gcc.gnu.org/viewcvs?rev=221708&root=gcc&view=rev
Log:
PR libstdc++/58038
PR libstdc++/60421
* include/std/thread (this_thread::sleep_for): Check for negative
durations.
(this_thread::sleep_until): Check for times in the past.
* testsuite/30_threads/this_thread/58038.cc: New.
* testsuite/30_threads/this_thread/60421.cc: New.
Added:
trunk/libstdc++-v3/testsuite/30_threads/this_thread/58038.cc
trunk/libstdc++-v3/testsuite/30_threads/this_thread/60421.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/std/thread