mirror of
https://github.com/nmap/nmap.git
synced 2026-01-02 04:49:02 +00:00
canonicalize some code
This commit is contained in:
@@ -133,10 +133,9 @@ local function dispatcher()
|
||||
s_condvar "broadcast"
|
||||
end
|
||||
|
||||
local n = table.getn(threads)
|
||||
if ( n == 0 ) then break end
|
||||
for i=1,n do
|
||||
local status, res = coroutine.resume(threads[i])
|
||||
if #threads == 0 then break end
|
||||
for i, thread in ipairs(threads) do
|
||||
local status, res = coroutine.resume(thread)
|
||||
if ( not(res) ) then -- thread finished its task?
|
||||
table.remove(threads, i)
|
||||
break
|
||||
@@ -336,4 +335,4 @@ function waitFile( filename, timeout )
|
||||
waitLast()
|
||||
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user