Update signal.rs

Allow `poll_wait` to be public so higher-order futures around Signal can be built.
This commit is contained in:
Bob McWhirter 2022-08-15 11:07:46 -04:00 committed by GitHub
parent f53367d8ba
commit 17b9eb5f86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,7 +69,7 @@ impl<T: Send> Signal<T> {
}) })
} }
fn poll_wait(&self, cx: &mut Context<'_>) -> Poll<T> { pub fn poll_wait(&self, cx: &mut Context<'_>) -> Poll<T> {
critical_section::with(|_| unsafe { critical_section::with(|_| unsafe {
let state = &mut *self.state.get(); let state = &mut *self.state.get();
match state { match state {