}
</pre>
+<h3 id="Unsynchronized_send_and_close_operations">Unsynchronized send and close operations</h3>
+
+<p>
+As this example demonstrates, unsynchronized send and close operations
+on the same channel can also be a race condition:
+</p>
+
+<pre>
+c := make(chan struct{}) // or buffered channel
+
+// The race detector cannot derive the happens before relation
+// for the following send and close operations. These two operations
+// are unsynchronized and happen concurrently.
+go func() { c <- struct{}{} }()
+close(c)
+</pre>
+
+<p>
+According to the Go memory model, a send on a channel happens before
+the corresponding receive from that channel completes. To synchronize
+send and close operations, use a receive operation that guarantees
+the send is done before the close:
+</p>
+
+<pre>
+c := make(chan struct{}) // or buffered channel
+
+go func() { c <- struct{}{} }()
+<-c
+close(c)
+</pre>
+
<h2 id="Supported_Systems">Supported Systems</h2>
<p>