tbc loop change part 5
This commit is contained in:
+3
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user