Skip to content

bug: Blocking.Reset does not wake goroutines blocked on OfferWait #39

@adrianbrad

Description

@adrianbrad

Blocking.Reset (blocking.go:101-110) calls notEmptyCond.Broadcast() but not notFullCond.Broadcast(). If the queue was at capacity with producers blocked on OfferWait, Reset shrinks the queue but never wakes them — they remain blocked despite free slots being available.

Fix:

bq.notEmptyCond.Broadcast()
bq.notFullCond.Broadcast()

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions