aboutsummaryrefslogtreecommitdiff
path: root/lib/std/fs
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-02-26 13:17:38 -0500
committerAndrew Kelley <andrew@ziglang.org>2020-02-26 13:17:38 -0500
commit0a8835268915feab561bdb68adb17aed76b9708f (patch)
tree718d061c406bf75c9ef81047798f08fc0ae046b7 /lib/std/fs
parent2b33e27e1c72703deb50bef5c486b86130a75687 (diff)
downloadzig-0a8835268915feab561bdb68adb17aed76b9708f.tar.gz
zig-0a8835268915feab561bdb68adb17aed76b9708f.zip
fix behavior tests with --test-evented-io
Diffstat (limited to 'lib/std/fs')
-rw-r--r--lib/std/fs/file.zig7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/std/fs/file.zig b/lib/std/fs/file.zig
index a3a428e77b..9d0ffcfd4a 100644
--- a/lib/std/fs/file.zig
+++ b/lib/std/fs/file.zig
@@ -20,7 +20,7 @@ pub const File = struct {
/// or, more specifically, whether the I/O is blocking.
io_mode: io.Mode,
- /// Even when std.io.mode is async, it is still sometimes desirable to perform blocking I/O, although
+ /// Even when 'std.io.mode' is async, it is still sometimes desirable to perform blocking I/O, although
/// not by default. For example, when printing a stack trace to stderr.
async_block_allowed: @TypeOf(async_block_allowed_no) = async_block_allowed_no,
@@ -40,6 +40,11 @@ pub const File = struct {
pub const OpenFlags = struct {
read: bool = true,
write: bool = false,
+
+ /// This prevents `O_NONBLOCK` from being passed even if `std.io.is_async`.
+ /// It allows the use of `noasync` when calling functions related to opening
+ /// the file, reading, and writing.
+ always_blocking: bool = false,
};
/// TODO https://github.com/ziglang/zig/issues/3802