add back lazy-load on mmkv init

This commit is contained in:
guoling
2023-12-25 16:46:58 +08:00
parent 690620c8f9
commit 92d0a17d82
2 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -119,10 +119,10 @@ MMKV::MMKV(const string &mmapID, MMKVMode mode, string *cryptKey, MMKVPath_t *ro
m_exclusiveProcessLock->m_enable = m_isInterProcess;
// sensitive zone
{
/*{
SCOPED_LOCK(m_sharedProcessLock);
loadFromFile();
}
}*/
}
#endif
+4 -4
View File
@@ -81,10 +81,10 @@ MMKV::MMKV(const string &mmapID, int size, MMKVMode mode, string *cryptKey, stri
m_exclusiveProcessLock->m_enable = m_isInterProcess;
// sensitive zone
{
/*{
SCOPED_LOCK(m_sharedProcessLock);
loadFromFile();
}
}*/
}
MMKV::MMKV(const string &mmapID, int ashmemFD, int ashmemMetaFD, string *cryptKey)
@@ -130,10 +130,10 @@ MMKV::MMKV(const string &mmapID, int ashmemFD, int ashmemMetaFD, string *cryptKe
m_exclusiveProcessLock->m_enable = m_isInterProcess;
// sensitive zone
{
/*{
SCOPED_LOCK(m_sharedProcessLock);
loadFromFile();
}
}*/
}
MMKV *MMKV::mmkvWithID(const string &mmapID, int size, MMKVMode mode, string *cryptKey, string *rootPath,