| 36 | } |
| 37 | |
| 38 | void 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 | |
| 45 | void ThreadLock::lock() { |
| 46 | EnterCriticalSection(&m_lock); |
nothing calls this directly
no outgoing calls
no test coverage detected