Re: Improve the granularity of PQsocketPoll's timeout parameter?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Improve the granularity of PQsocketPoll's timeout parameter?
Дата
Msg-id 928671.1718063844@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Improve the granularity of PQsocketPoll's timeout parameter?  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: Improve the granularity of PQsocketPoll's timeout parameter?
Список pgsql-hackers
Jeff Davis <pgsql@j-davis.com> writes:
> I briefly skimmed the thread and didn't find the reason why the API
> requires an absolute time.

Because a common call pattern is to loop around PQsocketPoll calls.
In that scenario you generally want to nail down the timeout time
before starting the loop, not have it silently move forward after
any random event that breaks the current wait (EINTR for example).
pqSocketCheck and pqConnectDBComplete both rely on this.

            regards, tom lane



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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: Improve the granularity of PQsocketPoll's timeout parameter?
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: 001_rep_changes.pl fails due to publisher stuck on shutdown