You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the Drop implementation of Secret<T> (linked above), why do you assert if the thread is panicking when the target is not on Windows and munlock was successful?
My purpose is to understand and learn from you.
Thank you.
The text was updated successfully, but these errors were encountered:
The comments say that attempting to munlock() a second item on the same page on Windows is expected to return an error, and is being ignored.
As I read it, the code says that if munlock() failed and this isn't on a Windows system (and the last OS error code was 158), then that's a problem (ie. we must panic) unless we're already panicking.
https://github.com/stouset/secrets/blob/master/src/secret.rs#L215
For the
Drop
implementation ofSecret<T>
(linked above), why do you assert if the thread is panicking when the target is not on Windows andmunlock
was successful?My purpose is to understand and learn from you.
Thank you.
The text was updated successfully, but these errors were encountered: