A Go package providing concurrent-safe queue implementations (FIFO and FixedFIFO) for goroutine-safe data handling.
goconcurrentqueue is a Go library that provides concurrent-safe queue implementations, including FIFO and FixedFIFO variants. It solves the problem of safely managing data flow between multiple goroutines by offering race-condition-free queues with blocking and non-blocking operations.
Go developers building concurrent applications that require safe data sharing between goroutines, such as worker pools, task schedulers, or event-driven systems.
Developers choose goconcurrentqueue for its simplicity, performance (especially FixedFIFO's speed), and adherence to design principles like Dependency Inversion, allowing flexible integration without locking into a specific implementation.
Go concurrent-safe, goroutine-safe, thread-safe queue
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
All queue implementations are goroutine-safe by design, preventing race conditions as explicitly stated in the README's core description for multi-goroutine environments.
FixedFIFO is benchmarked to be at least twice as fast as FIFO in concurrent scenarios, with detailed charts provided in the README under the benchmarks section.
Includes DequeueOrWaitForNextElementContext for timeout-aware waiting, demonstrated in the get started examples with live code playground links.
Adheres to the Dependency Inversion Principle, allowing high-level modules to depend on the abstract Queue interface, as shown in the philosophy section and example code.
Only offers FIFO and FixedFIFO queues; lacks priority queues, deques, or other common concurrent data structures, which the README does not address or provide.
No support for persistence; all data is volatile and lost on application restart, making it unsuitable for mission-critical or fault-tolerant systems without additional layers.
FixedFIFO's fixed capacity can lead to enqueue failures when full, requiring manual error handling and backpressure management, as noted in its cons section in the README.