Re: Introduce timeout capability for ConditionVariableSleep

Поиск
Список
Период
Сортировка
От Shawn Debnath
Тема Re: Introduce timeout capability for ConditionVariableSleep
Дата
Msg-id 20190321182049.GA95415@f01898859afd.ant.amazon.com
обсуждение исходный текст
Ответ на Re: Introduce timeout capability for ConditionVariableSleep  (Shawn Debnath <sdn@amazon.com>)
Ответы Re: Introduce timeout capability for ConditionVariableSleep  (Thomas Munro <thomas.munro@gmail.com>)
Список pgsql-hackers
On Sat, Mar 16, 2019 at 03:27:17PM -0700, Shawn Debnath wrote:
> > +     * Track the current time so that we can calculate the 
> > remaining timeout
> > +     * if we are woken up spuriously.
> > 
> > I think tha "track" means chasing a moving objects. So it might
> > be bettter that it is record or something?
> > 
> > >   * Wait for the given condition variable to be signaled or till timeout.
> > >   *
> > >   * Returns -1 when timeout expires, otherwise returns 0.
> > >   *
> > >   * See ConditionVariableSleep() for general usage.
> > > 
> > > > +ConditionVariableTimedSleep(ConditionVariable *cv, long timeout,
> > > > 
> > > > Counldn't the two-state return value be a boolean?
> 
> I will change it to Record in the next iteration of the patch.

Posting rebased and updated patch. Changed the word 'Track' to 'Record' 
and also changed variable name rem_timeout to cur_timeout to match 
naming in other use cases.


-- 
Shawn Debnath
Amazon Web Services (AWS)

Вложения

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Pluggable Storage - Andres's take
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Connections hang indefinitely while taking a gin index's LWLockbuffer_content lock