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
|
||||
end
|
||||
|
||||
waiters[t] = waiters[t]:next(function()
|
||||
local inputPipe = _M.poppets[t].input
|
||||
local outputPipe = _M.poppets[t].output
|
||||
waiters[t] = waiters[t]:next(function()
|
||||
inputPipe:write(serpent.dump({s, generationIdx}).."\n")
|
||||
inputPipe:flush()
|
||||
|
||||
local outputPipe = _M.poppets[t].output
|
||||
return readLoop(outputPipe)
|
||||
end)
|
||||
currentSpecies = currentSpecies + 1
|
||||
|
|
|
@ -570,6 +570,8 @@ local function mainLoop(_M, genome)
|
|||
::continue::
|
||||
end
|
||||
|
||||
message(_M, string.format('Found %d waypoints', #areaInfo.waypoints))
|
||||
|
||||
_M.areaInfo[_M.currentArea] = areaInfo
|
||||
end)
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue