MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / tryLock

Method tryLock

source/MRMesh/MRTbbThreadMutex.cpp:23–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21}
22
23std::optional<TbbThreadMutex::LockGuard> TbbThreadMutex::tryLock()
24{
25 if ( std::this_thread::get_id() == id_ && !lockFlag_.test_and_set() )
26 return LockGuard { *this };
27 return {};
28}
29
30} // namespace MR

Callers 3

forAllRangedFunction · 0.80
parallelForFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected