- delay: new
Delay[T comparable]queue. Elements become dequeuable at a deadline computed by a caller-supplied function atOffertime;Geterrors until the head is due,GetWaitsleeps until it is. Built on a typed min-heap by deadline; zero-alloc steady-state offer/get.
- README: add a "Choosing a queue" decision table, a Quick start snippet, a Features bullet list, a prominent pkg.go.dev link, and Contributing / Security / License sections.
- README: fix inconsistencies across the per-queue examples (variable naming, indentation,
PrintlnvsPrintf).
- priority:
MarshalJSONnow emits elements in priority order (was: arbitrary heap-array order) - blocking:
Resethonours capacity instead of restoring the untrimmed initial slice - blocking:
ResetbroadcastsnotFullCondso producers blocked inOfferWaitwake - blocking:
NewBlockingcopies the caller's slice instead of aliasing it - blocking:
GetandClearzero popped slots so pointerTno longer leaks via the backing array - blocking: producers
Broadcastinstead ofSignal; drop the fragilePeekWaitcascade - circular:
Resethonours capacity whenlen(initial) > capacity(was: corrupt size) - circular:
Resetzeros slots past the initial set so pointerTis reclaimable - priority:
Resetallocates a fresh backing slice instead of leaking past the new length - Validate capacity at construction; panic with a clear message on
<= 0(Circular) /< 0(Priority)
- linked: internal free list recycles popped nodes; steady-state offer/get drops to 0 allocs
- circular:
ContainsandMarshalJSONwalk in two contiguous chunks instead of per-element modulo - priority:
MarshalJSONsorts a copy withsort.Sliceinstead ofheap.Init+ Nheap.Pop
- Refresh README benchmarks
- Fix stale package overview ("2 implementations" → 4) and copy-paste comment typos
Linked.Iteratorholds the lock for the whole call (consistency with other queues)
- priority,blocking,circular:
Iterator()now takes a write lock — it mutates queue state (was: read lock, race-prone) - circular:
Containsloop bounds with non-zero head no longer skips elements or reads out of range - circular:
drainQueuedrains all elements (loop size captured beforepopdecrements it)
- circular: preallocate slice for
ClearandMarshalJSON; zero popped slot for GC - linked:
Iteratorfills a buffered channel synchronously instead of spawning a goroutine - linked: preallocate
ClearandMarshalJSONresults - priority:
Resetsimplified to single reslice + copy
- Add
SECURITY.mdwith private-disclosure process - Add
CONTRIBUTING.md - Add
.github/CODEOWNERS - Harden all GitHub Actions workflows: pinned by commit SHA, minimum
permissions:scope - Add OpenSSF Scorecard workflow + README badges
- Enforce 100% test coverage in CI
- Add signed releases via goreleaser + cosign keyless (Sigstore)
- blocking: fix
Reset()unbound memory growth potential - implement
MarshalJSONfor all queues
- linked: add linked queue implementation with tests
- linked: make linked queue implementation thread-safe
- fix a bug caused by not calling the (*sync.Cond).Wait() method in a loop
- implement
Circular Queueand add tests
- change the queue type parameter from
anytocomparable - add
Contains,Peek,Size,IsEmpty,IteratorandClearmethods to the Queue interface and implementations. In order to implement theContainsmethod the type parameter used by the queues was changed tocomparablefromany
- priority: removed lesser interface. added fuzz and benchmarks
- priority: remove lesser interface and use a less func
- Implement reset for all queue. Add missing source code from previous commit. Update readme
- add missing source code. update readme
- improve the
Queueinterface, implementPriorityqueue, fixBlockingtests, provide example tests
- blocking: implement the
Offermethod which returns an error in case the queue is full
- options: added
capacityoption - blocking: implement
Getmethod, it returns an error if there are no available elements in the queue
- blocking: remove internal channel and implement peek
- blocking: remove unnecessary ctx.Done case from Blocking.Refill()
- blocking: use buffered channel as the queue storage, as u/Cidan suggested
- blocking: change the index type from
atomic.Uint32toatomic.Uintptr
- blocking: add
Peekmethod, which returns but does not remove an element
- blocking: store index and sync as values instead of pointers
- blocking: as per u/skeeto comment, remove the useless error returns
- deadlock: fix the deadlock caused by unsynchronized index and broadcast channel
- blocking_queue: rename
GetintoTake
- blocking_queue: add first
blocking queueimplementation