ChiaHungDuan wrote: Suggested by Hans, also updated the test to only call notifyAll() after the counter increment so that we will catch the case which loses wake up. https://github.com/llvm/llvm-project/pull/69031