This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/60421] std::this_thread::sleep_for doesn't sleep for all arguments
- From: "jaak at ristioja dot ee" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 26 Mar 2015 21:51:46 +0000
- Subject: [Bug libstdc++/60421] std::this_thread::sleep_for doesn't sleep for all arguments
- Auto-submitted: auto-generated
- References: <bug-60421-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60421
Jaak Ristioja <jaak at ristioja dot ee> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |---
--- Comment #6 from Jaak Ristioja <jaak at ristioja dot ee> ---
I mean when I sleep for UINT64_MAX hours/years/millenia, you can't possibly
wrap that into a single nanosleep call due to the limitations of the type
time_t of the tv_sec parameter of the first argument to nanosleep. One
obviously can not get around using loop.
Additionally, the nanosleep code is also missing proper EINTR handling, which
again could break the sleep.
Reopening.