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

Native asynchronous file io #219

Open
buhman opened this issue Jun 13, 2017 · 2 comments
Open

Native asynchronous file io #219

buhman opened this issue Jun 13, 2017 · 2 comments

Comments

@buhman
Copy link
Member

buhman commented Jun 13, 2017

I think this would be fun to explore, once we have nothing better to do:

Once a mildly sane (platform-specific) implementation exists, it shouldn't be too hard to extend wrap_file or open_file appropriately.

@buhman buhman added the polish label Jun 13, 2017
@njsmith
Copy link
Member

njsmith commented Jan 16, 2018

Huh! Apparently Linux 4.14 actually added something useful here: https://kernelnewbies.org/Linux_4.14#Asynchronous_buffered_I.2FO_support

It's actually pretty sensible: it lets you do a "non-blocking read", so if the data is in the buffer cache you can just return it, before spending the overhead on dispatching to a thread.

Adding support to CPython's wrappers is bpo-31368. What would be even nicer is if they add a nonblocking option to the io readers.

@njsmith
Copy link
Member

njsmith commented Jan 16, 2018

I also just filed bpo-32561, which would make this MUCH easier for us to use.
Edit: Now python/cpython#76742

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

No branches or pull requests

3 participants