Our great sponsors
-
queue
⏪️ Go package providing multiple queue implementations. Developed in a thread-safe generic way. (by adrianbrad)
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Hello again, I came up with this implementation that uses buffered channels: https://github.com/adrianbrad/queue/blob/blocking-channel-implementation/blocking2.go. In order to drain the channel during a Reset, the channel is closed and refilled elements, while Take listens for both new values and the close signal. What do you think? The original Reset implementation is a bit faster, you can check the benchmarks here: https://github.com/adrianbrad/queue/blob/blocking-channel-implementation/blocking_bench_test.go
Related posts
- Hello, announcing v1.3.0 of my queue package: A Linked Queue implementation was added, complementing the Circular, Blocking, and Priority queues. All structures align with the standard Queue interface. Looking forward to your feedback!
- Hello, I released v1.2.0 of my queue package. A Circular Queue implementation is now available. Blocking and Priority queues were previously available. All implementations satisfy the Queue interface provided by the package. Any feedback would be greatly appreciated.
- [Code Review Request] Package providing multiple Queue implementations
- Seeking Insights: Tools Used in GitHub Actions for Security Code Checks and Vulnerability Detection
- Redis Re-Implemented with SQLite