From d458d8281380b501ec83a12e365b4541e2a9ef80 Mon Sep 17 00:00:00 2001 From: Manuel Simon Hirsig Date: Thu, 25 Feb 2016 17:28:45 +0100 Subject: [PATCH] working on big scan/control refactoring --- scan.lua | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/scan.lua b/scan.lua index fd43e51..b5c3d18 100644 --- a/scan.lua +++ b/scan.lua @@ -49,7 +49,7 @@ end function private.wait_for_results(k) if private.current_thread().params.type == 'bidder' then - return private.wait_for_bidder_results(k) + return Aux.control.wait_until(function() return Aux.bids_loaded end, k) elseif private.current_thread().params.type == 'owner' then return private.wait_for_owner_results(k) elseif private.current_thread().params.type == 'list' then @@ -57,14 +57,6 @@ function private.wait_for_results(k) end end -function private.wait_for_bidder_results(k) - if Aux.bids_loaded then - return k() - else -- recurse on the next update - return Aux.control.wait(private.wait_for_bidder_results, k) - end -end - function private.wait_for_owner_results(k) local updated if private.current_thread().page == Aux.current_owner_page then