
Research
Security News
The Landscape of Malicious Open Source Packages: 2025 Mid‑Year Threat Report
A look at the top trends in how threat actors are weaponizing open source packages to deliver malware and persist across the software supply chain.
= QueueDing alternative to Queue
{}[https://gitter.im/flajann2/queue_ding?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge] {
}[https://travis-ci.org/flajann2/queue_ding?branch=master]
== Gem Version
{}[http://badge.fury.io/rb/queue_ding]
{
}[https://travis-ci.org/flajann2/queue_ding]
This roughly mirrors the functionaly of Queue in allowing you to queue messages to one or more threads, and will block if the queue is empty, waking up when there is another message available.
Because this is derived directly from the Array class, it has all the expected Array functionality, with the appropriate wrappers for thread safety.
Like Queue, QueueDing is a FIFO queue.
== New Funtionality === v0.1.0 Automatic tee support added, so that multiple listening threads will get the same data. There is currenly no way to turn this feature off. If this is a problem for you, let me know and I'll add a switch sooner.
You may not want this behavior if you are using queue_ding to distrubute work among listening threads, but you will want this if you need to ensure multile listeners receive the smae data, as in the case with with my dyamic interfaces for browser-based Dashboards.
== Known Issues === v0.1.0 With the new Automatic Tee Feature, there is currently no cleanup for dead threads. This could potentially lead to a memory leak situation for long running tasks. This problem will be addressed later.
== Usage
== Examples
This is taken from the rspec tests.
require 'queue_ding'
include QueueDing
queue = QDing.new
tout = Thread.new do
(0..1000).each{ |j|
(i, num) = @queue.next
expect(j).to eq i
expect(num).to eq j * 7 + 3
}
end
tin = Thread.new do
(0..1000).map{|i| [i, i * 7 + 3]}.each{|pair| @queue << pair }
end
tin.join
tout.join
== Changelog
v0.1.0 2014-08-03 Added tee capability so that you can tee queue to multiple threads automatically. There are no settings for this. It just works. For some, this behavior may be undesirable, so an option will be added at a later date.
== Copyright
Copyright (c) 2014 Fred Mitchell. See LICENSE.txt for further details.
== Contributing to queue_ding
I am very open to any ideas you may have for new features you may want to see, any pull requests, etc.
== Why I Created QueueDing
I ran into an issue with Queue segfaulting on Ruby 2.1.1 and 2.1.2. I need this for my RubyNEAT project and simply has to work. Like deep_dive, this is driven by the RubyNEAT effort, which will be quite stringent. So expect to see further improvements and enhancements as the needs arise.
== Funny Trivia
"Queue Ding" is actually German for "Queue Thing", so it is my hopes my German compatriots will forgive me for any possible faux pas this might entail.
== Copyright
Copyright (c) 2014 Fred Mitchell. See LICENSE.txt for further details.
FAQs
Unknown package
We found that queue_ding demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A look at the top trends in how threat actors are weaponizing open source packages to deliver malware and persist across the software supply chain.
Security News
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.
Security News
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.