Merge pull request #2714 from noahbliss/patch-1

Doc update: signaled does not clear signal
This commit is contained in:
Dario Nieuwenhuis 2024-03-20 12:30:36 +00:00 committed by GitHub
commit 5477d57168
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -125,7 +125,7 @@ where
})
}
/// non-blocking method to check whether this signal has been signaled.
/// non-blocking method to check whether this signal has been signaled. This does not clear the signal.
pub fn signaled(&self) -> bool {
self.state.lock(|cell| {
let state = cell.replace(State::None);