Re: Introduce timeout capability for ConditionVariableSleep
Thomas Munro <thomas.munro@gmail.com>
From: Thomas Munro <thomas.munro@gmail.com>
To: Shawn Debnath <sdn@amazon.com>
Cc: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2019-07-09T11:03:18Z
Lists: pgsql-hackers
Attachments
- 0001-Introduce-timed-waits-for-condition-variables-v6.patch (application/octet-stream) patch v6-0001
- 0002-Forward-received-condition-variable-signals-on-ca-v6.patch (application/octet-stream) patch v6-0002
On Sun, Jul 7, 2019 at 3:09 PM Thomas Munro <thomas.munro@gmail.com> wrote: > + /* Timed out */ > + if (rc == 0) > + return true; Here's a version without that bit, because I don't think we need it. > That still leaves the danger that the CV can be signalled some time > after ConditionVariableTimedSleep() returns. So now I'm wondering if > ConditionVariableCancelSleep() should signal the CV if it discovers > that this process is not in the proclist, on the basis that that must > indicate that we've been signalled even though we're not interested in > the message anymore, and yet some other process else might be > interested, and that might have been the only signal that is ever > going to be delivered by ConditionVariableSignal(). And a separate patch to do that. Thoughts? -- Thomas Munro https://enterprisedb.com
Commits
-
Forward received condition variable signals on cancel.
- b91dd9de5ea0 13.0 landed
-
Introduce timed waits for condition variables.
- 1321509fa432 13.0 landed