aboutsummaryrefslogtreecommitdiff
path: root/src/unstable/readwritemutex.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/unstable/readwritemutex.cpp')
-rw-r--r--src/unstable/readwritemutex.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/unstable/readwritemutex.cpp b/src/unstable/readwritemutex.cpp
index 3d8ac7a..62e9ee1 100644
--- a/src/unstable/readwritemutex.cpp
+++ b/src/unstable/readwritemutex.cpp
@@ -49,6 +49,15 @@ void Bu::ReadWriteMutex::unlockRead()
49 mRead.unlock(); 49 mRead.unlock();
50} 50}
51 51
52//
53// The bWantWrite could be a counter like the read lock counter, however
54// once a write lock occurs and bWantWrite is set at least one wite
55// will definately occur. In practice most writes all happen one after
56// the other anyway and this way reads get a chance to mingle in.
57//
58// Really, just getting all currint reads to stop so a write can happen
59// I think is sufficient right now.
60//
52void Bu::ReadWriteMutex::lockWrite() 61void Bu::ReadWriteMutex::lockWrite()
53{ 62{
54 // Lock the read counter 63 // Lock the read counter