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

Function moduleAcquireGIL

src/module.cpp:5971–5984  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5969 return !fServerThread && aeThreadOwnsLock() && !g_fModuleThread && s_moduleGIL.hasReader();
5970}
5971void moduleAcquireGIL(int fServerThread, int fExclusive) {
5972 if (FModuleCallBackLock(fServerThread)) {
5973 return;
5974 }
5975
5976 if (fServerThread)
5977 {
5978 s_moduleGIL.acquireRead();
5979 }
5980 else
5981 {
5982 s_moduleGIL.acquireWrite(fExclusive);
5983 }
5984}
5985
5986int moduleTryAcquireGIL(bool fServerThread, int fExclusive) {
5987 if (FModuleCallBackLock(fServerThread)) {

Callers 6

afterSleepFunction · 0.85
workerThreadMainFunction · 0.85
moduleCloseKeyFunction · 0.85
RM_FreeThreadSafeContextFunction · 0.85
RM_ThreadSafeContextLockFunction · 0.85
moduleInitModulesSystemFunction · 0.85

Calls 3

FModuleCallBackLockFunction · 0.85
acquireReadMethod · 0.80
acquireWriteMethod · 0.80

Tested by

no test coverage detected