add blocking example to readme
This commit is contained in:
@@ -53,6 +53,11 @@ func main() {
|
|||||||
// start the scheduler
|
// start the scheduler
|
||||||
s.Start()
|
s.Start()
|
||||||
|
|
||||||
|
// block until you are ready to shut down
|
||||||
|
select {
|
||||||
|
case <-time.After(time.Minute):
|
||||||
|
}
|
||||||
|
|
||||||
// when you're done, shut it down
|
// when you're done, shut it down
|
||||||
err = s.Shutdown()
|
err = s.Shutdown()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user