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

Method AssertHeld

tests/gtest/gtest.h:1927–1930  ·  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

1925 // Does nothing if the current thread holds the mutex. Otherwise, crashes
1926 // with high probability.
1927 void AssertHeld() const {
1928 GTEST_CHECK_(has_owner_ && pthread_equal(owner_, pthread_self()))
1929 << "The current thread is not holding the mutex @" << this;
1930 }
1931
1932 // A static mutex may be used before main() is entered. It may even
1933 // be used before the dynamic initialization stage. Therefore we

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected