Skip to content

Commit 084b71a

Browse files
committed
Document synchronicity
1 parent 36aa75e commit 084b71a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

library/std/src/fs.rs

+6
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@ use crate::time::SystemTime;
8585
/// by different processes. Avoid assuming that holding a `&File` means that the
8686
/// file will not change.
8787
///
88+
/// # Platform-specific behavior
89+
///
90+
/// On Windows, the implementation of [`Read`] and [`Write`] traits for `File`
91+
/// perform synchronous I/O operations. Therefore the underlying file must not
92+
/// have been opened for asynchronous I/O (e.g. by using `FILE_FLAG_OVERLAPPED`).
93+
///
8894
/// [`BufReader<R>`]: io::BufReader
8995
/// [`sync_all`]: File::sync_all
9096
#[stable(feature = "rust1", since = "1.0.0")]

0 commit comments

Comments
 (0)