aboutsummaryrefslogtreecommitdiff
path: root/doc/go_mem.html
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-11-08 21:08:27 -0800
committerRuss Cox <rsc@golang.org>2009-11-08 21:08:27 -0800
commit830813f01969487af6f2e3c8f1e3cf2fad4a119d (patch)
treee94ad4a5bfb2318113b63eea13faa496ccd48b96 /doc/go_mem.html
parent97a55a7485dd13c6520f881b48b9410d83a812c1 (diff)
downloadgo-830813f01969487af6f2e3c8f1e3cf2fad4a119d.tar.gz
go-830813f01969487af6f2e3c8f1e3cf2fad4a119d.zip
assorted cleanup
R=r, iant CC=go-dev http://go/go-review/1025024
Diffstat (limited to 'doc/go_mem.html')
-rw-r--r--doc/go_mem.html9
1 files changed, 6 insertions, 3 deletions
diff --git a/doc/go_mem.html b/doc/go_mem.html
index 1ecddddff0..ede79720a6 100644
--- a/doc/go_mem.html
+++ b/doc/go_mem.html
@@ -233,7 +233,7 @@ The <code>sync</code> package implements two lock data types,
</p>
<p class="rule">
-For any <code>sync.Mutex</code> variable <code>l</code> and <i>n</i> &lt; <i>m</i>,
+For any <code>sync.Mutex</code> or <code>sync.RWMutex</code> variable <code>l</code> and <i>n</i> &lt; <i>m</i>,
the <i>n</i>'th call to <code>l.Unlock()</code> happens before the <i>m</i>'th call to <code>l.Lock()</code> returns.
</p>
@@ -265,8 +265,11 @@ before the second call to <code>l.Lock()</code> (in <code>main</code>) returns,
which happens before the <code>print</code>.
</p>
-<p>
-TODO(rsc): <code>sync.RWMutex</code>.
+<p class="rule">
+For any call to <code>l.RLock</code> on a <code>sync.RWMutex</code> variable <code>l</code>,
+there is an <i>n</i> such that the <code>l.RLock</code> happens (returns) after the <i>n</i>'th call to
+<code>l.Unlock</code> and the matching <code>l.RUnlock</code> happens
+before the <i>n</i>+1'th call to <code>l.Lock</code>.
</p>
<h3>Once</h3>