aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorn1t0r <git@n1t0r.com>2023-04-21 20:34:47 +1000
committern1t0r <git@n1t0r.com>2023-04-21 20:34:47 +1000
commita035828ac2a3ea1edf3c3c6c91d35df45c64696a (patch)
treece246f4ddda0eb38b084ce9024d6b13f8b096434
parentba5a67a7bdd3d73309d34c50a2149dee2b3213b8 (diff)
downloadsteady-a035828ac2a3ea1edf3c3c6c91d35df45c64696a.tar.gz
steady-a035828ac2a3ea1edf3c3c6c91d35df45c64696a.tar.bz2
steady-a035828ac2a3ea1edf3c3c6c91d35df45c64696a.zip
Revert "Delete key from partitions map if it is empty."HEADmaster
This reverts commit ba5a67a7bdd3d73309d34c50a2149dee2b3213b8.
-rw-r--r--queue.go3
1 files changed, 0 insertions, 3 deletions
diff --git a/queue.go b/queue.go
index 04eaef7..3d61ec3 100644
--- a/queue.go
+++ b/queue.go
@@ -244,9 +244,6 @@ func (q *Queue[K]) Pop() (item Item[K], ok bool) {
q.snoozeQ.Push(key, time.Now().Add(q.interval()).UnixMicro())
q.snoozeQNotEmpty.Signal()
} else {
- q.partitionsMu.Lock()
- delete(q.partitions, key)
- q.partitionsMu.Unlock()
q.inactiveKeys[key] = time.Now().Add(q.interval())
}
q.snoozeQMu.Unlock()