MCPcopy Create free account
hub / github.com/apache/brpc / try_lock

Method try_lock

src/bthread/mutex.h:66–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64 }
65 void unlock() { bthread_mutex_unlock(&_mutex); }
66 bool try_lock() { return 0 == bthread_mutex_trylock(&_mutex); }
67 bool timed_lock(const struct timespec* abstime) {
68 return !bthread_mutex_timedlock(&_mutex, abstime);
69 }

Callers 1

try_lockMethod · 0.45

Calls 1

bthread_mutex_trylockFunction · 0.85

Tested by

no test coverage detected