Skip to content

Support asynchronous file I/O on Windows#14321

Closed
HertzDevil wants to merge 12 commits intocrystal-lang:masterfrom
HertzDevil:feature/windows-async-file-io
Closed

Support asynchronous file I/O on Windows#14321
HertzDevil wants to merge 12 commits intocrystal-lang:masterfrom
HertzDevil:feature/windows-async-file-io

Conversation

@HertzDevil
Copy link
Contributor

Since #14255, it is now possible to open non-blocking Files on Windows, as previously their blocking mode could not be changed after initialization. This PR makes operations on those Files actually work.

@HertzDevil HertzDevil added kind:feature platform:windows Windows support based on the MSVC toolchain / Win32 API topic:stdlib:files labels Feb 25, 2024
Copy link
Contributor

@yxhuvud yxhuvud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. Is this the first case of windows functionality being better than the libevent based one?

end

bytes_read.to_i64
def self.pread(file, buffer, offset)
Copy link
Contributor

@yxhuvud yxhuvud Feb 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is high time to rename this method as the name refers to a libc call that isn't used on this OS.

read_with_offset perhaps?

@beta-ziliani
Copy link
Member

@HertzDevil is this ready for review?

@HertzDevil
Copy link
Contributor Author

missing specs

@HertzDevil
Copy link
Contributor Author

All the progress here has been split into individual PRs that work with the refactored IOCP interface; closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:feature platform:windows Windows support based on the MSVC toolchain / Win32 API topic:stdlib:files

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants