aboutsummaryrefslogtreecommitdiff
path: root/src/poll.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/poll.rs')
-rw-r--r--src/poll.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/poll.rs b/src/poll.rs
index 6446281..7ff2038 100644
--- a/src/poll.rs
+++ b/src/poll.rs
@@ -613,6 +613,15 @@ impl Registry {
.try_clone()
.map(|selector| Registry { selector })
}
+
+ /// Internal check to ensure only a single `Waker` is active per [`Poll`]
+ /// instance.
+ #[cfg(debug_assertions)]
+ pub(crate) fn register_waker(&self) {
+ if self.selector.register_waker() {
+ panic!("Only a single `Waker` can be active per `Poll` instance");
+ }
+ }
}
impl fmt::Debug for Registry {