[PATCH] [libc++] Handle partial nanosleeps in this_thread::sleep_for

David Majnemer david.majnemer at gmail.com
Wed Jun 4 12:51:16 PDT 2014


Committed as r210210.


On Wed, Jun 4, 2014 at 8:54 AM, Marshall Clow <mclow.lists at gmail.com> wrote:

>
> On May 28, 2014, at 11:24 PM, David Majnemer <david.majnemer at gmail.com>
> wrote:
>
> > sleep_for is currently implemented by calculating an appropriate
> timespec from a chrono::nanoseconds and passing the result to nanosleep.
> >
> > However, signals may result in nanosleep returning with only some of the
> requested sleeping performed.
> >
> > Utilize nanosleep's "time-remaining" out parameter to continue sleeping
> when this occurs.
>
> * Patch looks good
> * includes test
> * Test fails w/o patch
> * Test succeeds w/patch
>
> LGTM - please commit .
> (and thanks!)
>
> — Marshall
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140604/ad8e0c96/attachment.html>


More information about the cfe-commits mailing list