1.
Reference: http://bbs.chinaunix.net/thread-3699479-1-1.html
1.1, the second floor said:
“
Write that is less than or equal to pipe_buf bytes must be an atomic operation that exceeds this value.
POSIX Specifies that PIPE_BUF is at least 512.
”
1.2, nine floor said:
“
Pipe_buf This value can be viewed with ulimit-p. The default for Linux is 8. But the unit here is not a byte here is the unit 512bytes. So the default size is 4096. As long as you don't write more than that, he must be an atom.
”
2.
DuplicateHandle
Reference: http://www.cnblogs.com/staring-hxs/p/3576927.html
3.
Reference: http://m.blog.csdn.net/blog/mituan2008/7415744
“
When the pipeline (blocked read and write) is full, it will block to the writing end;
Only read the pipe to read the empty (the length of the pipe on my machine is 4K) before continuing to write the pipeline, I used to think that, as long as the read-end read a byte, the writing end can continue to write.
There is: I started a crazy writing pipeline, can write 64K instead of the logo on the machine (I use Ulimit-p to see is 4K) 4 K. I don't know what's going on here.
”
ZC: Personal understanding, once full, you need to read empty to continue to write. Without a full fill, there is no blocking. I have not verified ...
N
Plumbing some knowledge