debugging

pull/1/head
Oliver Kennedy 2018-04-27 20:43:43 -04:00
parent 739997ff9e
commit 39c63d126c
1 changed files with 2 additions and 9 deletions

View File

@ -31,15 +31,8 @@ class Pipeline
def transform_all(&transformation)
old_op = @op
@op = lambda {|nxt| old_op.call(lambda {|fp|
IO.pipe {|r, w|
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
}
data = transformation.call(fp.read)
nxt.call(StringIO.new(data))
})}
end