aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorn1t0r <git@n1t0r.com>2023-04-15 22:33:16 +1000
committern1t0r <git@n1t0r.com>2023-04-15 22:34:10 +1000
commit169b58daedada9437e94309ede1d0de6a5f39194 (patch)
treecd3ba1673be3200a24db216f256015710788df58
parent8feb6b48c79e947f6635e35aed13fffebab5a2aa (diff)
downloadsteady-169b58daedada9437e94309ede1d0de6a5f39194.tar.gz
steady-169b58daedada9437e94309ede1d0de6a5f39194.tar.bz2
steady-169b58daedada9437e94309ede1d0de6a5f39194.zip
Fix empty tag check on pop.
-rw-r--r--queue.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/queue.go b/queue.go
index e2441c9..daab68d 100644
--- a/queue.go
+++ b/queue.go
@@ -201,7 +201,7 @@ func (q *Queue[K]) Pop() (item Item[K], ok bool) {
}
part.notFull.Signal()
// Signal the tagCount if the item is tagged
- if t, ok := i.(Tagged); ok {
+ if t, ok := i.(Tagged); ok && t.Tag() != "" {
tc := q.tagCount[t.Tag()]
if tc == nil {
panic("steady: pop: tag doesn't exist")