Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AsyncIO: SDL_AsyncIOFromFile could be asynchronous? #11588

Open
thatcosmonaut opened this issue Dec 5, 2024 · 2 comments
Open

AsyncIO: SDL_AsyncIOFromFile could be asynchronous? #11588

thatcosmonaut opened this issue Dec 5, 2024 · 2 comments

Comments

@thatcosmonaut
Copy link
Collaborator

io_uring allows for async file opening, so it's possible that AsyncIOFromFile could take the queue object as an argument and make this operation optionally non-blocking depending on the backend. If the argument against is that this makes the behavior inconsistent across implementations, I understand, but I wanted to raise the issue just in case.

@kg
Copy link

kg commented Dec 5, 2024

It could also make sense to use a threadpool for 'async' opens on targets that don't natively have them. Opening a file isn't guaranteed to be fast on Windows, thanks to filter drivers, virus scanners, etc.

@icculus
Copy link
Collaborator

icculus commented Dec 5, 2024

We opted not to do it because only io_uring supported it, and we are hoping that opening is (generally) a fast operation, but also we were concerned about the added complexity to the app in making this part also async.

But let me think about it a bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants