Skip to Content Skip to Search

Shared queue distributor - workers compete for tests (work stealing). Internal/testing helper; not exposed as a public distribution mode.

Methods
A
C
I
N
P
T

Class Public methods

new()

# File activesupport/lib/active_support/testing/parallelization/test_distributor.rb, line 42
def initialize
  @queue = Queue.new
end

Instance Public methods

add_test(test)

# File activesupport/lib/active_support/testing/parallelization/test_distributor.rb, line 46
def add_test(test)
  @queue << test
end

close()

# File activesupport/lib/active_support/testing/parallelization/test_distributor.rb, line 62
def close
  @queue.close
end

interrupt()

# File activesupport/lib/active_support/testing/parallelization/test_distributor.rb, line 54
def interrupt
  @queue.clear
end

pending?()

# File activesupport/lib/active_support/testing/parallelization/test_distributor.rb, line 58
def pending?
  !@queue.empty?
end

take(...)

# File activesupport/lib/active_support/testing/parallelization/test_distributor.rb, line 50
def take(...)
  @queue.pop
end