// incorrectly.
//
// To prevent the timer firing after a call to Stop,
-// check the return value and drain the channel. For example:
+// check the return value and drain the channel.
+// For example, assuming the program has not received from t.C already:
+//
// if !t.Stop() {
// <-t.C
// }
+//
// This cannot be done concurrent to other receives from the Timer's
// channel.
func (t *Timer) Stop() bool {
// It returns true if the timer had been active, false if the timer had
// expired or been stopped.
//
-// To reuse an active timer, always call its Stop method first and—if it had
-// expired—drain the value from its channel. For example:
+// Resetting a timer must take care not to race with the send into t.C
+// that happens when the current timer expires.
+// If a program has already received a value from t.C, the timer is known
+// to have expired, and t.Reset can be used directly.
+// If a program has not yet received a value from t.C, however,
+// the timer must be stopped and—if Stop reports that the timer expired
+// before being stopped—the channel explicitly drained:
+//
// if !t.Stop() {
// <-t.C
// }
// t.Reset(d)
+//
// This should not be done concurrent to other receives from the Timer's
// channel.
//
// Note that it is not possible to use Reset's return value correctly, as there
// is a race condition between draining the channel and the new timer expiring.
-// Reset should always be used in concert with Stop, as described above.
+// Reset should always be invoked on stopped or expired channels, as described above.
// The return value exists to preserve compatibility with existing programs.
func (t *Timer) Reset(d Duration) bool {
if t.r.f == nil {