remove unused :which parameter to Environment#wait_for_threaded_commands

This commit is contained in:
Josh Holtrop 2019-02-16 18:36:44 -05:00
parent 935848c3b5
commit 5c3b615aee

View File

@ -662,17 +662,13 @@ module Rscons
# #
# @param options [Hash] # @param options [Hash]
# Options. # Options.
# @option options [Set<ThreadedCommand>, Array<ThreadedCommand>] :which
# Which {ThreadedCommand} objects to wait for. If not specified, this
# method will wait for any.
# @option options [Boolean] :nonblock # @option options [Boolean] :nonblock
# Set to true to not block. # Set to true to not block.
# #
# @return [ThreadedCommand, nil] # @return [ThreadedCommand, nil]
# The {ThreadedCommand} object that is finished. # The {ThreadedCommand} object that is finished.
def wait_for_threaded_commands(options = {}) def wait_for_threaded_commands(options = {})
options[:which] ||= @threaded_commands threads = @threaded_commands.map(&:thread)
threads = options[:which].map(&:thread)
if finished_thread = find_finished_thread(threads, options[:nonblock]) if finished_thread = find_finished_thread(threads, options[:nonblock])
threaded_command = @threaded_commands.find do |tc| threaded_command = @threaded_commands.find do |tc|
tc.thread == finished_thread tc.thread == finished_thread