Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. goconcurrentqueue

goconcurrentqueue

MITGov0.7.0

A Go package providing concurrent-safe queue implementations (FIFO and FixedFIFO) for goroutine-safe data handling.

GitHubGitHub
434 stars35 forks0 contributors

What is goconcurrentqueue?

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.

Target Audience

Go developers building concurrent applications that require safe data sharing between goroutines, such as worker pools, task schedulers, or event-driven systems.

Value Proposition

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.

Overview

Go concurrent-safe, goroutine-safe, thread-safe queue

Use Cases

Best For

  • Implementing worker pools with safe task distribution
  • Building event-driven systems with goroutine-safe event queues
  • Creating task schedulers that require concurrent enqueue/dequeue operations
  • Developing data pipelines where multiple producers/consumers share a queue
  • Learning concurrent data structure patterns in Go
  • Applications needing fixed-capacity queues for memory control

Not Ideal For

  • Applications requiring priority-based or LIFO (last-in-first-out) queueing mechanisms
  • Systems demanding lock-free data structures for maximum throughput in ultra-high contention scenarios
  • Projects needing persistent, disk-backed queues for data durability across restarts
  • Simple, single-goroutine programs where built-in channels or slices would suffice without added complexity

Pros & Cons

Pros

Concurrent Safety

All queue implementations are goroutine-safe by design, preventing race conditions as explicitly stated in the README's core description for multi-goroutine environments.

High Performance

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.

Blocking with Context

Includes DequeueOrWaitForNextElementContext for timeout-aware waiting, demonstrated in the get started examples with live code playground links.

Design Flexibility

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.

Cons

Limited Data Structures

Only offers FIFO and FixedFIFO queues; lacks priority queues, deques, or other common concurrent data structures, which the README does not address or provide.

In-Memory Only

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.

Fixed Capacity Issues

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.

Frequently Asked Questions

Quick Stats

Stars434
Forks35
Contributors0
Open Issues3
Last commit3 years ago
CreatedSince 2019

Tags

#goroutine-safe#queue#concurrent#slice#go-library#data-structures#thread-safe#fifo-queue#golang#concurrency#go#fifo

Built With

G
Go

Included in

Go169.1k
Auto-fetched 6 hours ago

Related Projects

hatchethatchet

🪓 An orchestration engine for background tasks, AI agents, and durable workflows

Stars7,895
Forks492
Last commit11 hours ago
dequedeque

Fast ring-buffer deque (double-ended queue)

Stars786
Forks67
Last commit2 months ago
queuequeue

⏪️ Go package providing multiple queue implementations. Developed in a thread-safe generic way.

Stars366
Forks15
Last commit8 days ago
dequedeque

A highly optimized double-ended queue

Stars205
Forks7
Last commit3 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub