Use WaitLatch() for condition variables.
authorThomas Munro <tmunro@postgresql.org>
Thu, 30 Jul 2020 05:23:32 +0000 (17:23 +1200)
committerThomas Munro <tmunro@postgresql.org>
Thu, 30 Jul 2020 05:42:45 +0000 (17:42 +1200)
commite2d394df5df28ab5ee4bfac6b13837e99e24045d
tree05aafff298d20c9bedc55c723826554bb762403f
parent3347c982bab0dd56d5b6cb784521233ba2bbac27
Use WaitLatch() for condition variables.

Previously, condition_variable.c created a long lived WaitEventSet to
avoid extra system calls.  WaitLatch() now uses something similar
internally, so there is no point in wasting an extra kernel descriptor.

Reviewed-by: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Discussion: https://postgr.es/m/CA%2BhUKGJAC4Oqao%3DqforhNey20J8CiG2R%3DoBPqvfR0vOJrFysGw%40mail.gmail.com
src/backend/storage/lmgr/condition_variable.c