MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / freeLuaScriptsAsync

Function freeLuaScriptsAsync

src/lazyfree.cpp:242–249  ·  view source on GitHub ↗

Free lua_scripts dict, if the dict is huge enough, free it in async way. */

Source from the content-addressed store, hash-verified

240
241/* Free lua_scripts dict, if the dict is huge enough, free it in async way. */
242void freeLuaScriptsAsync(dict *lua_scripts) {
243 if (dictSize(lua_scripts) > LAZYFREE_THRESHOLD) {
244 atomicIncr(lazyfree_objects,dictSize(lua_scripts));
245 bioCreateLazyFreeJob(lazyFreeLuaScripts,1,lua_scripts);
246 } else {
247 dictRelease(lua_scripts);
248 }
249}

Callers 1

scriptingReleaseFunction · 0.85

Calls 2

bioCreateLazyFreeJobFunction · 0.85
dictReleaseFunction · 0.70

Tested by

no test coverage detected