From: | Shawn Debnath <sdn(at)amazon(dot)com> |
---|---|
To: | Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> |
Cc: | <thomas(dot)munro(at)gmail(dot)com>, <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Introduce timeout capability for ConditionVariableSleep |
Date: | 2019-03-21 18:20:50 |
Message-ID: | 20190321182049.GA95415@f01898859afd.ant.amazon.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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)
Attachment | Content-Type | Size |
---|---|---|
0001-Introduce-timeout-capability-for-ConditionVariableSleep-v4.patch | text/plain | 4.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2019-03-21 18:25:53 | Re: Connections hang indefinitely while taking a gin index's LWLock buffer_content lock |
Previous Message | Andres Freund | 2019-03-21 18:15:57 | Re: Pluggable Storage - Andres's take |