MCPcopy Create free account
hub / github.com/awslabs/aws-lambda-cpp / AssertHeld

Method AssertHeld

tests/gtest/gtest-all.cc:10079–10083  ·  view source on GitHub ↗

Does nothing if the current thread holds the mutex. Otherwise, crashes with high probability.

Source from the content-addressed store, hash-verified

10077// Does nothing if the current thread holds the mutex. Otherwise, crashes
10078// with high probability.
10079void Mutex::AssertHeld() {
10080 ThreadSafeLazyInit();
10081 GTEST_CHECK_(owner_thread_id_ == ::GetCurrentThreadId())
10082 << "The current thread is not holding the mutex @" << this;
10083}
10084
10085namespace {
10086

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected