]> granicus.if.org Git - postgresql/commit
Forward received condition variable signals on cancel.
authorThomas Munro <tmunro@postgresql.org>
Sat, 13 Jul 2019 01:55:10 +0000 (13:55 +1200)
committerThomas Munro <tmunro@postgresql.org>
Sat, 13 Jul 2019 02:50:18 +0000 (14:50 +1200)
commitb91dd9de5ea0839d0d248ebbe8cb926c3df52c7c
tree19da475a11d2fae877149ea88a686b334e012f29
parent1321509fa43293615c4e5fa5dc8eed5286f479b1
Forward received condition variable signals on cancel.

After a process decides not to wait for a condition variable, it can
still consume a signal before it reaches ConditionVariableCancelSleep().
In that case, pass the signal on to another waiter if possible, so that
a signal doesn't go missing when there is another process ready to
receive it.

Author: Thomas Munro
Reviewed-by: Shawn Debnath
Discussion: https://postgr.es/m/CA%2BhUKGLQ_RW%2BXs8znDn36e-%2Bmq2--zrPemBqTQ8eKT-VO1OF4Q%40mail.gmail.com
src/backend/storage/lmgr/condition_variable.c