instance method
steal
Ruby on Rails edge
Since edge Private — implementation detail, not part of the public APISignature
steal(worker_id)
No documentation comment.
Parameters
-
worker_idreq
Source
# File activesupport/lib/active_support/testing/parallelization/test_distributor.rb, line 170
def steal(worker_id)
# Steal from other workers in a consistent order
@worker_count.times do |offset|
other_id = (worker_id + offset + 1) % @worker_count
if job = pop_now(other_id)
return job
end
end
nil
end
Defined in activesupport/lib/active_support/testing/parallelization/test_distributor.rb line 170
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Testing::Parallelization::RoundRobinWorkStealingDistributor