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

Method releaseWrite

src/readwritelock.h:85–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83 }
84
85 void releaseWrite(bool exclusive = true) {
86 std::unique_lock<fastlock> rm(m_readLock, std::defer_lock);
87 serverAssert(m_writeCount > 0);
88 if (m_multi) {
89 rm.lock();
90 if (exclusive)
91 m_writeLock.unlock();
92 m_cv.notify_all();
93 }
94 m_writeCount--;
95 }
96
97 void downgradeWrite(bool exclusive = true) {
98 releaseWrite(exclusive);

Callers 1

moduleReleaseGILFunction · 0.80

Calls 2

lockMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected