Remove json from hosts checkpoint and fix host iterator bug

This commit is contained in:
emanuele-f 2017-11-30 16:26:22 +01:00
parent 5b9bba1188
commit d350a3131f
9 changed files with 89 additions and 23 deletions

View file

@ -47,18 +47,18 @@ local function getBatchedIterator(batched_function, field, function_params)
function_params = function_params or {}
return function()
if ((nextSlot == 0) or (nextSlot == nil)) and not first_iteration then
iterator_finished = true
end
if iterator_finished then return nil end
if (loaded_elems == nil) or table.empty(loaded_elems) then
if loaded_elems ~= nil then
-- that was the first iteration
first_iteration = false
end
if ((nextSlot == 0) or (nextSlot == nil)) and not first_iteration then
iterator_finished = true
end
if iterator_finished then return nil end
-- we need to load new slots from C
if(debug_enabled) then
io.write("getBatchedIterator["..field.."](curSlot=".. nextSlot ..")\n")