debugging

pull/1/head
Oliver Kennedy 2018-04-27 20:37:32 -04:00
parent ab67020819
commit 739997ff9e
1 changed files with 7 additions and 3 deletions

View File

@ -32,9 +32,13 @@ class Pipeline
old_op = @op
@op = lambda {|nxt| old_op.call(lambda {|fp|
IO.pipe {|r, w|
w.write(transformation.call(fp.read))
w.close_write
nxt.call(r)
task = Thread.new(fp, w, transformation) { |fp, w, transformation|
w.write(transformation.call(fp.read))
w.close_write
}
ret = nxt.call(r)
task.join()
ret
}
})}
end