Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
68
void SC::RWLock::unlockRead()
69
{
70
mutex.lock();
71
activeReaders--;
72
if (activeReaders == 0 && waitingWriters > 0)
73
{
74
writersQ.signal();
75
}
76
mutex.unlock();
77
}
78
79
void SC::RWLock::lockWrite()
80
{
Callers
1
testRWLock
Method · 0.80
Calls
3
lock
Method · 0.45
signal
Method · 0.45
unlock
Method · 0.45
Tested by
1
testRWLock
Method · 0.64