Skip to content

Commit 3dc0b91

Browse files
committed
docs: add comments.
Signed-off-by: Bo-Yi Wu <[email protected]>
1 parent 5a952b2 commit 3dc0b91

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,9 @@ The third step to create a queue and initialize multiple workers, receive all jo
113113
time.Sleep(50 * time.Millisecond)
114114
}
115115

116+
// shutdown the service and notify all the worker
116117
q.Shutdown()
118+
// wait all jobs are complete.
117119
q.Wait()
118120
```
119121

@@ -187,7 +189,9 @@ func main() {
187189
time.Sleep(50 * time.Millisecond)
188190
}
189191

192+
// shutdown the service and notify all the worker
190193
q.Shutdown()
194+
// wait all jobs are complete.
191195
q.Wait()
192196
}
193197
```

_example/nsq/main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ func main() {
7373
time.Sleep(50 * time.Millisecond)
7474
}
7575

76+
// shutdown the service and notify all the worker
7677
q.Shutdown()
78+
// wait all jobs are complete.
7779
q.Wait()
7880
}

_example/simple/main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ func main() {
6565
time.Sleep(50 * time.Millisecond)
6666
}
6767

68+
// shutdown the service and notify all the worker
6869
q.Shutdown()
70+
// wait all jobs are complete.
6971
q.Wait()
7072
}

0 commit comments

Comments
 (0)