MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / try_lock_internal

Function try_lock_internal

extern/boost/boost/thread/lock_algorithms.hpp:24–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22 {
23 template <typename MutexType1, typename MutexType2>
24 unsigned try_lock_internal(MutexType1& m1, MutexType2& m2)
25 {
26 boost::unique_lock<MutexType1> l1(m1, boost::try_to_lock);
27 if (!l1)
28 {
29 return 1;
30 }
31 if (!m2.try_lock())
32 {
33 return 2;
34 }
35 l1.release();
36 return 0;
37 }
38
39 template <typename MutexType1, typename MutexType2, typename MutexType3>
40 unsigned try_lock_internal(MutexType1& m1, MutexType2& m2, MutexType3& m3)

Callers 3

lock_helperFunction · 0.85
try_lock_implFunction · 0.85
try_lockFunction · 0.85

Calls 2

try_lockMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected