local functions broke start_reading/start_writing
Looks like Lua's local functions lose access to outer scopes (upvalues) or something like that..
This commit is contained in:
parent
38ff2ddf11
commit
f07eb03492
|
@ -10,7 +10,7 @@ function start_reading(fs, filename)
|
|||
return result
|
||||
end
|
||||
|
||||
local function reading_task(infile, chanout)
|
||||
function reading_task(infile, chanout)
|
||||
for line in infile:lines() do
|
||||
chanout:send(line)
|
||||
end
|
||||
|
@ -36,7 +36,7 @@ function start_writing(fs, filename)
|
|||
return result
|
||||
end
|
||||
|
||||
local function writing_task(outfile, chanin)
|
||||
function writing_task(outfile, chanin)
|
||||
while true do
|
||||
local line = chanin:recv()
|
||||
if line == nil then break end -- end of file
|
||||
|
|
Loading…
Reference in New Issue