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

AsyncSeek trait #1512

Closed
Nemo157 opened this issue Apr 4, 2019 · 5 comments · Fixed by #1553
Closed

AsyncSeek trait #1512

Nemo157 opened this issue Apr 4, 2019 · 5 comments · Fixed by #1553

Comments

@Nemo157
Copy link
Member

Nemo157 commented Apr 4, 2019

I've def been missing an AsyncSeek impl. We've been looking to implement a filesystem API for Romio, and that's one of the traits we need. Tokio has a counterpart directly implemented on the File struct, but it seems being able to generalize it would be ideal.

Originally posted by @yoshuawuyts in #1510 (comment)

@Nemo157
Copy link
Member Author

Nemo157 commented Apr 4, 2019

@yoshuawuyts do you know if there are actual async implementations of seeking available anywhere? I assume the FS API for Romio would just be doing something like a blocking seek on a thread-pool?

I guess it still makes sense to add the trait as an operation that code will want to use, even if there aren't any implementations that can cheaply support it yet.

@yoshuawuyts
Copy link
Member

@yoshuawuyts do you know if there are actual async implementations of seeking available anywhere? I assume the FS API for Romio would just be doing something like a blocking seek on a thread-pool?

Yeah, that's our thinking for Romio currently. Ideally we could later investigate using AIO / io_uring to have true async fs calls, but until then having the trait available would be nice for all implementations (:

@LucioFranco
Copy link
Member

Just gonna leave this here, we have a PR open in tokio for sometime around this, may be useful tokio-rs/tokio#785

@yoshuawuyts
Copy link
Member

Thanks so much @taiki-e! 🎉

@cramertj
Copy link
Member

Yeah-- huge thanks @taiki-e! All of your recent work on futures-rs has been incredibly helpful <3

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

Successfully merging a pull request may close this issue.

4 participants