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

Method initialize

Core/ThreadLock_Win32.cpp:38–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38void ThreadLock::initialize() {
39 // TODO: a better spin count?
40 if (!InitializeCriticalSectionAndSpinCount(&m_lock, 1024)) {
41 MMKVError("fail to init critical section:%d", GetLastError());
42 }
43}
44
45void ThreadLock::lock() {
46 EnterCriticalSection(&m_lock);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected