File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
library/std/src/sys/windows Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,9 @@ pub struct Pipes {
5353/// with `OVERLAPPED` instances, but also works out ok if it's only ever used
5454/// once at a time (which we do indeed guarantee).
5555pub fn anon_pipe ( ours_readable : bool , their_handle_inheritable : bool ) -> io:: Result < Pipes > {
56+ // A 64kb pipe capacity is the same as a typical Linux default.
57+ const PIPE_BUFFER_CAPACITY : u32 = 64 * 1024 ;
58+
5659 // Note that we specifically do *not* use `CreatePipe` here because
5760 // unfortunately the anonymous pipes returned do not support overlapped
5861 // operations. Instead, we create a "hopefully unique" name and create a
@@ -91,8 +94,8 @@ pub fn anon_pipe(ours_readable: bool, their_handle_inheritable: bool) -> io::Res
9194 | c:: PIPE_WAIT
9295 | reject_remote_clients_flag,
9396 1 ,
94- 4096 ,
95- 4096 ,
97+ PIPE_BUFFER_CAPACITY ,
98+ PIPE_BUFFER_CAPACITY ,
9699 0 ,
97100 ptr:: null_mut ( ) ,
98101 ) ;
You can’t perform that action at this time.
0 commit comments