big refactoring
This commit is contained in:
+5
-7
@@ -37,15 +37,13 @@ do
|
||||
call(on_complete)
|
||||
end
|
||||
|
||||
private.state{
|
||||
get = function()
|
||||
local _, state = next(filter(scan_states, function(state) return state.id == control.thread_id end))
|
||||
return state
|
||||
end,
|
||||
}
|
||||
function private.state.get()
|
||||
local _, state = next(filter(scan_states, function(state) return state.id == control.thread_id end))
|
||||
return state
|
||||
end
|
||||
end
|
||||
|
||||
private.query{get=function() return state.params.queries[state.query_index] end}
|
||||
function private.query.get() return state.params.queries[state.query_index] end
|
||||
|
||||
function wait_for_callback(...)
|
||||
local send_signal, signal_received = signal()
|
||||
|
||||
Reference in New Issue
Block a user