File tree 1 file changed +7
-5
lines changed 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -1165,14 +1165,16 @@ pub fn stderr() -> Stderr;
1165
1165
```
1166
1166
1167
1167
* ` stdin ` - returns a handle to a ** globally shared** standard input of
1168
- the process which is buffered as well. All operations on this handle will
1169
- first require acquiring a lock to ensure access to the shared buffer is
1170
- synchronized. The handle can be explicitly locked for a critical section so
1171
- relocking is not necessary.
1168
+ the process which is buffered as well. Due to the globally shared nature of
1169
+ this handle, all operations on ` Stdin ` directly will acquire a lock internally
1170
+ to ensure access to the shared buffer is synchronized. This implementation
1171
+ detail is also exposed through a ` lock ` method where the handle can be
1172
+ explicitly locked for a period of time so relocking is not necessary.
1172
1173
1173
1174
The ` Read ` trait will be implemented directly on the returned ` Stdin ` handle
1174
1175
but the ` BufRead ` trait will not be (due to synchronization concerns). The
1175
- locked version of ` Stdin ` will provide an implementation of ` BufRead ` .
1176
+ locked version of ` Stdin ` (` StdinLock ` ) will provide an implementation of
1177
+ ` BufRead ` .
1176
1178
1177
1179
The design will largely be the same as is today with the ` old_io ` module.
1178
1180
You can’t perform that action at this time.
0 commit comments