English 中文(简体)
粉碎管道——在准备投射时什么是Happens
原标题:Python Pipes - What Happens When Reading Output Incrementally
  • 时间:2009-10-23 09:33:58
  •  标签:
最佳回答

你的假设是错误的。 枪手不一定要看到整个卷宗去除。 阅读单页文档格式。 有一个目录,各部分各部分各有余。

它有可能将档案编成零件。

“未经压缩的档案被完全存放......”

不一定。 你们为什么要重新承担这一责任,或者在你们读了。

所有低级I/O电话都可以阻挡。 以枪口书写——写到管道时——当管道缓冲区满时可以阻挡。 这是I/O通往管道的方式。 管道I/O区。

详细检查管道的人工页。

If a process attempts to read from an empty pipe, then read(2) will
block until data is available. If a process attempts to write to a
full pipe (see below), then write(2) blocks until sufficient data has
been read from the pipe to allow the write to complete. Non-blocking
I/O is possible by using the fcntl(2) F_SETFL operation to enable the
O_NONBLOCK open file status flag.

问题回答

This really comes from gunzip implementation, not from python. It is written in C. It probably uses fwrite() from C s stdio.h to write its output.

我使用自动产生产出缓冲,一旦填满,则在<条码>fwrite()栏上加块,直到能够写上更多的字。





相关问题
热门标签