# std.Io: give File a nonblocking bit on Windows · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/59ebd82ebf4746e47b3e84367b1ea87bbec7d222)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 59ebd82ebf4746e47b3e84367b1ea87bbec7d222

Requested commit: 59ebd82ebf4746e47b3e84367b1ea87bbec7d222

Commit: 59ebd82ebf4746e47b3e84367b1ea87bbec7d222

Tree: cc2d47e76d2c380aaf0c1c12039a1af8f6b04970

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
std.Io: give File a nonblocking bit on Windows

This tracks whether it is a file opened in synchronous mode, or
something that supports APC.

This will be needed in order to know whether concurrent batch operations
on the file should return error.ConcurrencyUnavailable, or use APC to
complete the batch.

This patch also switches to using NtCreateFile directly in
std.Io.Threaded for dirCreateFile, as well as NtReadFile for
fileReadStreaming, making it handle files opened in synchronous mode as
well as files opened in asynchronous mode.

```

## Parents

- [fa988e88ed21485830a70276b5c7567efb122f80](https://git.cafe/gitcafe/zig/commit/fa988e88ed21485830a70276b5c7567efb122f80?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/59ebd82ebf4746e47b3e84367b1ea87bbec7d222?format=markdown)
