8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc8219d commit 3f3d60dCopy full SHA for 3f3d60d
src/backend/storage/lmgr/condition_variable.c
@@ -71,14 +71,17 @@ ConditionVariablePrepareToSleep(ConditionVariable *cv)
71
&MyProc->procLatch, NULL);
72
}
73
74
+ /*
75
+ * Reset my latch before adding myself to the queue and before entering
76
+ * the caller's predicate loop.
77
+ */
78
+ ResetLatch(&MyProc->procLatch);
79
+
80
/* Add myself to the wait queue. */
81
SpinLockAcquire(&cv->mutex);
82
if (!proclist_contains(&cv->wakeup, pgprocno, cvWaitLink))
83
proclist_push_tail(&cv->wakeup, pgprocno, cvWaitLink);
84
SpinLockRelease(&cv->mutex);
-
- /* Reset my latch before entering the caller's predicate loop. */
- ResetLatch(&MyProc->procLatch);
85
86
87
/*--------------------------------------------------------------------------
0 commit comments