-
Notifications
You must be signed in to change notification settings - Fork 73
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
Does lock
require &mut self
?
#74
Comments
I think this is a bug as there should be no external synchronization requirements, c.f. e.g. here. It also delegates to an internal method taking Would you mind creating a PR? |
Will do. |
Interesting. @adamreichold shouldn't we make those methods |
But can't the OS already flush pages at any point in time asynchronously? |
What we are mutating are the page tables maintained by the operating system. Those are internally synchronized by the kernel (e.g. Linux's infamous This is similar to why for example This synchronization is also the reason why heavily multi-threaded programs on Linux suffer when a lot of |
(There is even talk about sharing not only pages but also page tables between processes for reasons of efficiency for heavily containerized systems so that |
Oh wow. I didn't knew that. I guess as long as we're modifying something that isn't in full Rust control - there is no need for |
Thanks for the quick response & merge. 😄 |
@RazrFalcon Would you mind to push this to |
Done. |
Is there a good reason for
lock()
to require&mut self
?To compare,
advice()
is just&self
.The text was updated successfully, but these errors were encountered: