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

Method UniqueLockBase

src/bvar/utils/lock_timer.h:221–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219public:
220 typedef Mutex mutex_type;
221 explicit UniqueLockBase(mutex_type& mutex)
222 : _timer(butil::Timer::STARTED), _lock(mutex.mutex()),
223 _mutex(&mutex) {
224 _timer.stop();
225 }
226
227 UniqueLockBase(mutex_type& mutex, std::defer_lock_t defer_lock)
228 : _timer(), _lock(mutex.mutex(), defer_lock), _mutex(&mutex) {

Callers

nothing calls this directly

Calls 3

u_elapsedMethod · 0.80
mutexMethod · 0.45
stopMethod · 0.45

Tested by

no test coverage detected