MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / unlockWrite

Method unlockWrite

Libraries/Threading/Threading.cpp:92–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90 waitingWriters--;
91 writerActive = true;
92 mutex.unlock();
93}
94
95void SC::RWLock::unlockWrite()
96{
97 mutex.lock();
98 writerActive = false;
99 if (waitingWriters > 0)
100 {
101 writersQ.signal();
102 }
103 else
104 {
105 readersQ.broadcast();
106 }
107 mutex.unlock();
108}

Callers 1

testRWLockMethod · 0.80

Calls 4

lockMethod · 0.45
signalMethod · 0.45
broadcastMethod · 0.45
unlockMethod · 0.45

Tested by 1

testRWLockMethod · 0.64