Bläddra i källkod

deadline: adjust example comments

They were rather unclear. Fixes #9.
Evan Huus 10 år sedan
förälder
incheckning
b86b1ec0dd
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      deadline/README.md

+ 2 - 2
deadline/README.md

@@ -13,8 +13,8 @@ Creating a deadline takes one parameter: how long to wait.
 dl := deadline.New(1 * time.Second)
 
 err := dl.Run(func(stopper <-chan struct{}) error {
-	// do something possibly slow
-	// check stopper function and give up if timed out
+	// do something potentially slow
+	// give up when the `stopper` channel is closed (indicating a time-out)
 	return nil
 })