MCPcopy Create free account
hub / github.com/Tencent/MMKV / lock

Method lock

Core/ThreadLock.cpp:46–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46void ThreadLock::lock() {
47 auto ret = pthread_mutex_lock(&m_lock);
48 if (ret != 0) {
49 MMKVError("fail to lock %p, ret=%d, errno=%s", &m_lock, ret, strerror(errno));
50 }
51}
52
53void ThreadLock::unlock() {
54 auto ret = pthread_mutex_unlock(&m_lock);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected