Fix potential problem with input and output pipes
This commit is contained in:
parent
ed5e64c6b7
commit
707bfb0059
2 changed files with 4 additions and 2 deletions
|
@ -232,12 +232,12 @@ return function(promise)
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local inputPipe = _M.poppets[t].input
|
||||||
|
local outputPipe = _M.poppets[t].output
|
||||||
waiters[t] = waiters[t]:next(function()
|
waiters[t] = waiters[t]:next(function()
|
||||||
local inputPipe = _M.poppets[t].input
|
|
||||||
inputPipe:write(serpent.dump({s, generationIdx}).."\n")
|
inputPipe:write(serpent.dump({s, generationIdx}).."\n")
|
||||||
inputPipe:flush()
|
inputPipe:flush()
|
||||||
|
|
||||||
local outputPipe = _M.poppets[t].output
|
|
||||||
return readLoop(outputPipe)
|
return readLoop(outputPipe)
|
||||||
end)
|
end)
|
||||||
currentSpecies = currentSpecies + 1
|
currentSpecies = currentSpecies + 1
|
||||||
|
|
|
@ -570,6 +570,8 @@ local function mainLoop(_M, genome)
|
||||||
::continue::
|
::continue::
|
||||||
end
|
end
|
||||||
|
|
||||||
|
message(_M, string.format('Found %d waypoints', #areaInfo.waypoints))
|
||||||
|
|
||||||
_M.areaInfo[_M.currentArea] = areaInfo
|
_M.areaInfo[_M.currentArea] = areaInfo
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue