1 | use super::{Driver, Handle, TOKEN_SIGNAL}; |
---|---|
2 | |
3 | use std::io; |
4 | |
5 | impl Handle { |
6 | pub(crate) fn register_signal_receiver( |
7 | &self, |
8 | receiver: &mut mio::net::UnixStream, |
9 | ) -> io::Result<()> { |
10 | self.registry |
11 | .register(source:receiver, TOKEN_SIGNAL, interests:mio::Interest::READABLE)?; |
12 | Ok(()) |
13 | } |
14 | } |
15 | |
16 | impl Driver { |
17 | pub(crate) fn consume_signal_ready(&mut self) -> bool { |
18 | let ret: bool = self.signal_ready; |
19 | self.signal_ready = false; |
20 | ret |
21 | } |
22 | } |
23 |