This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/60421] std::this_thread::sleep_for doesn't sleep for all arguments


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]