Commit a440441d authored by Nathan Bronson's avatar Nathan Bronson Committed by Facebook Github Bot

add comment to help people debugging an assertion failure

Summary:
SharedMutex asserts that all locks have been released before
destruction.  This diff adds a comment near those asserts making it more
clear what they are checking.

Reviewed By: yfeldblum

Differential Revision: D7137906

fbshipit-source-id: 082a804616950d9a962ee932c9021c453f43a35d
parent 57c236fe
......@@ -274,6 +274,10 @@ class SharedMutexImpl {
}
#ifndef NDEBUG
// These asserts check that everybody has released the lock before it
// is destroyed. If you arrive here while debugging that is likely
// the problem. (You could also have general heap corruption.)
// if a futexWait fails to go to sleep because the value has been
// changed, we don't necessarily clean up the wait bits, so it is
// possible they will be set here in a correct system
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment