diff --git a/source/util/src/tlockfree.c b/source/util/src/tlockfree.c index 69ab6c1a52c3f1c36e25b3edf160ed2cd6c4d12e..6f7b6f6901c2c0b508b43848c11a00bae29a26d0 100644 --- a/source/util/src/tlockfree.c +++ b/source/util/src/tlockfree.c @@ -44,7 +44,7 @@ void taosWLockLatch(SRWLatch *pLatch) { nLoops = 0; while (1) { oLatch = atomic_load_32(pLatch); - if (0 == oLatch) break; + if (oLatch == TD_RWLATCH_WRITE_FLAG) break; nLoops++; if (nLoops > 1000) { sched_yield();