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

Method unlock

Core/ThreadLock.cpp:53–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53void ThreadLock::unlock() {
54 auto ret = pthread_mutex_unlock(&m_lock);
55 if (ret != 0) {
56 MMKVError("fail to unlock %p, ret=%d, errno=%s", &m_lock, ret, strerror(errno));
57 }
58}
59
60bool ThreadLock::try_lock() {
61 auto ret = pthread_mutex_trylock(&m_lock);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected