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

Method unlockRead

Libraries/Threading/Threading.cpp:68–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66 }
67 activeReaders++;
68 mutex.unlock();
69}
70
71void SC::RWLock::unlockRead()
72{
73 mutex.lock();
74 activeReaders--;
75 if (activeReaders == 0 && waitingWriters > 0)
76 {
77 writersQ.signal();
78 }
79 mutex.unlock();
80}

Callers 1

testRWLockMethod · 0.80

Calls 3

lockMethod · 0.45
signalMethod · 0.45
unlockMethod · 0.45

Tested by 1

testRWLockMethod · 0.64