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

fs: switch to an intrusive waker style #2927

Closed
carllerche opened this issue Oct 8, 2020 · 0 comments · Fixed by #2930
Closed

fs: switch to an intrusive waker style #2927

carllerche opened this issue Oct 8, 2020 · 0 comments · Fixed by #2930
Assignees
Labels
A-tokio Area: The main tokio crate C-feature-request Category: A feature request.
Milestone

Comments

@carllerche
Copy link
Member

Apply the same work as #2779 to the fs module. This should enable switching to &self for most methods.

@carllerche carllerche added A-tokio Area: The main tokio crate C-feature-request Category: A feature request. labels Oct 8, 2020
@carllerche carllerche added this to the v0.3 milestone Oct 8, 2020
@carllerche carllerche mentioned this issue Oct 8, 2020
10 tasks
@carllerche carllerche self-assigned this Oct 8, 2020
carllerche added a commit that referenced this issue Oct 8, 2020
Changes inherent methods to take `&self` instead of `&mut self`. This
brings the API in line with `std`.

This patch is implemented by using a `tokio::sync::Mutex` to guard the
internal `File` state. This is not an ideal implementation strategy
doesn't make a big impact compared to having to dispatch operations to a
background thread followed by a blocking syscall.

In the future, the implementation can be improved as we explore async
file-system APIs provided by the operating-system (iocp / io_uring).

Closes #2927
carllerche added a commit that referenced this issue Oct 9, 2020
Changes inherent methods to take `&self` instead of `&mut self`. This
brings the API in line with `std`.

This patch is implemented by using a `tokio::sync::Mutex` to guard the
internal `File` state. This is not an ideal implementation strategy
doesn't make a big impact compared to having to dispatch operations to a
background thread followed by a blocking syscall.

In the future, the implementation can be improved as we explore async
file-system APIs provided by the operating-system (iocp / io_uring).

Closes #2927
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate C-feature-request Category: A feature request.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant