tbc loop change part 5

This commit is contained in:
Manuel Simon Hirsig
2017-06-02 20:19:32 +02:00
parent 0fe79adf99
commit d9da99b537
6 changed files with 41 additions and 25 deletions
+3 -3
View File
@@ -27,14 +27,14 @@ do
function M.abort(scan_id)
local aborted = T
for type, state in scan_states do
for type, state in pairs(scan_states) do
if not scan_id or state.id == scan_id then
kill_thread(state.id)
scan_states[type] = nil
tinsert(aborted, state)
end
end
for _, state in aborted do
for _, state in pairs(aborted) do
do (state.params.on_abort or nop)() end
end
end
@@ -50,7 +50,7 @@ do
end
function get_state()
for _, state in scan_states do
for _, state in pairs(scan_states) do
if state.id == thread_id then
return state
end