
Security News
CISA’s 2025 SBOM Guidance Adds Hashes, Licenses, Tool Metadata, and Context
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
A tool for testing threaded code. Its purpose is to enable reasoning about thread order.
# A somewhat contrived class we're going to test.
class MyQueue
attr_reader :array
def initialize
@array, @mutex = [], Mutex.new
end
def enqueue
@mutex.synchronize { @array << yield }
end
end
require 'rspec/autorun'
require 'thread_order'
RSpec.describe MyQueue do
let(:queue) { described_class.new }
let(:order) { ThreadOrder.new }
after { order.apocalypse! } # ensure everything gets cleaned up (technically redundant for our one example, but it's a good practice)
it 'is threadsafe on enqueue' do
# will execute in a thread, can be invoked by name
order.declare :concurrent_enqueue do
queue.enqueue { :concurrent }
end
# this enqueue will block until the mutex puts the other one to sleep
queue.enqueue do
order.pass_to :concurrent_enqueue, resume_on: :sleep
:main
end
order.join_all # concurrent_enqueue may still be asleep
expect(queue.array).to eq [:main, :concurrent]
end
end
# >> MyQueue
# >> is threadsafe on enqueue
# >>
# >> Finished in 0.00131 seconds (files took 0.08687 seconds to load)
# >> 1 example, 0 failures
FAQs
Unknown package
We found that thread_order 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.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.