diff --git a/README.md b/README.md index 0113ab4c1a9ac87ec67c09589d9da5b74c656358..7b67487ef8b456bd37fb0f7cf5f7959e8698487a 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ import ( func main() { // Connect to Disque pool. jobs, _ := disque.New("127.0.0.1:7711") // Accepts more arguments. + defer jobs.Close() // Enqueue three jobs with different priorities. job1, _ := jobs.Add(data1, "high") @@ -43,6 +44,7 @@ import ( func main() { // Connect to Disque pool. jobs, _ := disque.New("127.0.0.1:7711") // Accepts more arguments. + defer jobs.Close() for { // Get job from highest priority queue possible. Blocks by default.