浏览代码

deadline: adjust example comments

They were rather unclear. Fixes #9.
Evan Huus 10 年之前
父节点
当前提交
b86b1ec0dd
共有 1 个文件被更改,包括 2 次插入2 次删除
  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
 })