diff --git a/README.md b/README.md index dfb95e2..139f29b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,11 @@ # Queue for Tinh Tinh +
+GitHub Release +GitHub License +
+ + ![](https://avatars.githubusercontent.com/u/178628733?s=400&u=2a8230486a43595a03a6f9f204e54a0046ce0cc4&v=4) ## Description diff --git a/queue.go b/queue.go index dce97c1..f091802 100644 --- a/queue.go +++ b/queue.go @@ -289,10 +289,15 @@ func (q *Queue) IsLimit() bool { } } +// Pause stops the queue from running. When paused, the queue will not accept new +// jobs and will not run any jobs in the queue. It will resume when Resume is +// called. func (q *Queue) Pause() { q.running = false } +// Resume resumes the queue from a paused state. When resumed, the queue will +// accept new jobs and run any jobs in the queue. func (q *Queue) Resume() { q.running = true q.Run()