Re: TODO-item: Add sleep() function, remove from regress.c

Поиск
Список
Период
Сортировка
От Jim C. Nasby
Тема Re: TODO-item: Add sleep() function, remove from regress.c
Дата
Msg-id 20060111004416.GR3902@pervasive.com
обсуждение исходный текст
Ответ на Re: TODO-item: Add sleep() function, remove from regress.c  (Joachim Wieland <joe@mcknight.de>)
Ответы Re: TODO-item: Add sleep() function, remove from regress.c
Список pgsql-patches
On Tue, Jan 10, 2006 at 11:31:13AM +0100, Joachim Wieland wrote:
> No, cancelling the sleep works (at least for Unix). Isn't cancelling
> implemented via a signal that interrupts select() ?
>
> Anyway, I've changed it, removing the ~2000s limit is a good point.
> +     while (secs > 1.0)
> +     {
> +         pg_usleep(1000000);
> +         CHECK_FOR_INTERRUPTS();
> +         secs -= 1.0;
> +     }

Won't this result in a call to pg_sleep with a long sleep time ending up
sleeping noticeably longer than requested?
--
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461

В списке pgsql-patches по дате отправления:

Предыдущее
От: Mark Kirkwood
Дата:
Сообщение: Re: Summary table trigger example race condition
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: TODO-item: Add sleep() function, remove from regress.c