未验证 提交 6a46c079 编写于 作者: Y yuyang18

Polish PyReader

上级 b048ddf0
...@@ -545,7 +545,11 @@ def py_reader(capacity, ...@@ -545,7 +545,11 @@ def py_reader(capacity,
reader = monkey_patch_reader_methods(main_prog_var) reader = monkey_patch_reader_methods(main_prog_var)
if use_double_buffer: if use_double_buffer:
reader = double_buffer(reader, name=double_buffer_name) double_buffer_reader = double_buffer(reader, name=double_buffer_name)
# we return a double buffer reader. However, the reset method comes from
# py_reader.
double_buffer_reader.reset = reader.reset
reader = double_buffer_reader
return reader, feed_queue return reader, feed_queue
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册