File tree 1 file changed +5
-2
lines changed
library/std/src/sys/windows
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,9 @@ pub struct Pipes {
53
53
/// with `OVERLAPPED` instances, but also works out ok if it's only ever used
54
54
/// once at a time (which we do indeed guarantee).
55
55
pub 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
+
56
59
// Note that we specifically do *not* use `CreatePipe` here because
57
60
// unfortunately the anonymous pipes returned do not support overlapped
58
61
// 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
91
94
| c:: PIPE_WAIT
92
95
| reject_remote_clients_flag,
93
96
1 ,
94
- 4096 ,
95
- 4096 ,
97
+ PIPE_BUFFER_CAPACITY ,
98
+ PIPE_BUFFER_CAPACITY ,
96
99
0 ,
97
100
ptr:: null_mut ( ) ,
98
101
) ;
You can’t perform that action at this time.
0 commit comments