# fs.File: improve handling async I/O on Windows · gitcafe/zig

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

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

Visibility: public

Requested revision: 5656f5090d8646e076db50da03cfc6ae686eb76b

Requested commit: 5656f5090d8646e076db50da03cfc6ae686eb76b

Commit: 5656f5090d8646e076db50da03cfc6ae686eb76b

Tree: 89b400bd5cf8eadf57b92af194a44bc9530f9594

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
fs.File: improve handling async I/O on Windows

Before it was possible for .intended_io_mode = .blocking,
.capable_io_mode = .evented, and then the implementation would put a
request on the fs thread, which is the wrong behavior. Now it always
calls the appropriate WriteFile/ReadFile function, passing the intended
io mode directly as a parameter.

This makes the behavior tests pass on Windows with --test-evented-io.

```

## Parents

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

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