big refactoring
This commit is contained in:
+7
-7
@@ -37,15 +37,15 @@ do
|
||||
call(on_complete)
|
||||
end
|
||||
|
||||
function accessor.state()
|
||||
local _, state = next(filter(scan_states, function(state) return state.id == control.thread_id end))
|
||||
return state
|
||||
end
|
||||
private.state{
|
||||
get = function()
|
||||
local _, state = next(filter(scan_states, function(state) return state.id == control.thread_id end))
|
||||
return state
|
||||
end,
|
||||
}
|
||||
end
|
||||
|
||||
function accessor.query()
|
||||
return state.params.queries[state.query_index]
|
||||
end
|
||||
private.query{get=function() 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