File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,10 @@ pub trait FileDescription: std::fmt::Debug + FileDescriptionExt {
135
135
136
136
/// Reads as much as possible into the given buffer `ptr`.
137
137
/// `len` indicates how many bytes we should try to read.
138
- /// `dest` is where the return value should be stored: number of bytes read, or `-1` in case of error.
138
+ ///
139
+ /// When the read is done, `finish` will be called. Note that `read` itself may return before
140
+ /// that happens! Everything that should happen "after" the `read` needs to happen inside
141
+ /// `finish`.
139
142
fn read < ' tcx > (
140
143
self : FileDescriptionRef < Self > ,
141
144
_communicate_allowed : bool ,
@@ -149,7 +152,10 @@ pub trait FileDescription: std::fmt::Debug + FileDescriptionExt {
149
152
150
153
/// Writes as much as possible from the given buffer `ptr`.
151
154
/// `len` indicates how many bytes we should try to write.
152
- /// `dest` is where the return value should be stored: number of bytes written, or `-1` in case of error.
155
+ ///
156
+ /// When the write is done, `finish` will be called. Note that `write` itself may return before
157
+ /// that happens! Everything that should happen "after" the `write` needs to happen inside
158
+ /// `finish`.
153
159
fn write < ' tcx > (
154
160
self : FileDescriptionRef < Self > ,
155
161
_communicate_allowed : bool ,
You can’t perform that action at this time.
0 commit comments