aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorn1t0r <git@n1t0r.com>2023-01-13 12:05:34 +1100
committern1t0r <git@n1t0r.com>2023-04-01 19:18:26 +1100
commit38ec0c02f039036502155c2e8f02540dc9f2d4fb (patch)
tree91b893d65908a46696955050dcc8830595b3e80b
parentc903df34b65581c366b53cad68fb778b0cf84c72 (diff)
downloadsteady-38ec0c02f039036502155c2e8f02540dc9f2d4fb.tar.gz
steady-38ec0c02f039036502155c2e8f02540dc9f2d4fb.tar.bz2
steady-38ec0c02f039036502155c2e8f02540dc9f2d4fb.zip
Remove redundant exit check in Pop.
-rw-r--r--queue.go4
1 files changed, 0 insertions, 4 deletions
diff --git a/queue.go b/queue.go
index f756a2e..0b59e6e 100644
--- a/queue.go
+++ b/queue.go
@@ -127,10 +127,6 @@ func (q *Queue[K]) Pop() (item Item, ok bool) {
q.once.Do(q.init)
// In case it's called after stop.
q.snoozeQMu.Lock()
- if q.exit {
- q.snoozeQMu.Unlock()
- return nil, false
- }
for q.snoozeQ.Len() == 0 && !q.exit {
q.snoozeQNotEmpty.Wait()
}