working on big scan/control refactoring

This commit is contained in:
Manuel Simon Hirsig
2016-02-25 15:43:18 +01:00
parent 8d888f4e96
commit 5af1b28021
6 changed files with 78 additions and 158 deletions
+2 -10
View File
@@ -28,7 +28,7 @@ function current_thread()
end
function public.start(params)
private.abort(params.type)
public.abort(params.type)
local thread_id = Aux.control.new(private.scan)
threads[params.type] = {
@@ -37,15 +37,7 @@ function public.start(params)
}
end
function public.abort(k)
private.abort()
if k then
return k()
end
end
function private.abort(type)
function public.abort(type)
for t, thread in pairs(threads) do
if not type or type == t then
if thread.params.on_abort then