- 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 Queue
and add tests
- change the queue type parameter from
any
tocomparable
- add
Contains
,Peek
,Size
,IsEmpty
,Iterator
andClear
methods to the Queue interface and implementations. In order to implement theContains
method the type parameter used by the queues was changed tocomparable
fromany
- 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
Queue
interface, implementPriority
queue, fixBlocking
tests, provide example tests
- blocking: implement the
Offer
method which returns an error in case the queue is full
- options: added
capacity
option - blocking: implement
Get
method, 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.Uint32
toatomic.Uintptr
- blocking: add
Peek
method, 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
Get
intoTake
- blocking_queue: add first
blocking queue
implementation