From a99e6e81b2899c500f4d69db393bad48d1fbd098 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Tue, 23 May 2017 14:10:45 -0400 Subject: [PATCH] simplify Environment#process looping --- lib/rscons/environment.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/rscons/environment.rb b/lib/rscons/environment.rb index ae83bd4..8a4ee5d 100644 --- a/lib/rscons/environment.rb +++ b/lib/rscons/environment.rb @@ -312,12 +312,8 @@ module Rscons completed_tcs = Set.new # First do a non-blocking wait to pick up any threads that have # completed since last time. - loop do - if tc = wait_for_threaded_commands(nonblock: true) - completed_tcs << tc - else - break - end + while tc = wait_for_threaded_commands(nonblock: true) + completed_tcs << tc end # If needed, do a blocking wait.