about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorChris Denton <christophersdenton@gmail.com>2022-03-30 12:36:00 +0100
committerChris Denton <christophersdenton@gmail.com>2022-04-05 08:14:13 +0100
commit084b71a54ff86db4d220845e7a8847b9928f89cf (patch)
treead2012795301dd22df2881de1a3b113665df3615 /library/std/src
parent36aa75e44d5c6a83d9cb61eeaaadf82354307015 (diff)
downloadrust-084b71a54ff86db4d220845e7a8847b9928f89cf.tar.gz
rust-084b71a54ff86db4d220845e7a8847b9928f89cf.zip
Document synchronicity
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/fs.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/library/std/src/fs.rs b/library/std/src/fs.rs
index 46acd0ee4c5..10c424269c7 100644
--- a/library/std/src/fs.rs
+++ b/library/std/src/fs.rs
@@ -85,6 +85,12 @@ use crate::time::SystemTime;
 /// by different processes. Avoid assuming that holding a `&File` means that the
 /// file will not change.
 ///
+/// # Platform-specific behavior
+///
+/// On Windows, the implementation of [`Read`] and [`Write`] traits for `File`
+/// perform synchronous I/O operations. Therefore the underlying file must not
+/// have been opened for asynchronous I/O (e.g. by using `FILE_FLAG_OVERLAPPED`).
+///
 /// [`BufReader<R>`]: io::BufReader
 /// [`sync_all`]: File::sync_all
 #[stable(feature = "rust1", since = "1.0.0")]