Subscribe a new receiver. Always reflects the current state — a receiver created after [`signal`] has been called observes the signal on its first poll of `wait_cancelled`, so there is no "signal arrived before I subscribed" race. [`signal`]: Self::signal
(&self)
| 40 | /// |
| 41 | /// [`signal`]: Self::signal |
| 42 | pub fn subscribe(&self) -> ShutdownReceiver { |
| 43 | ShutdownReceiver::from_watch(self.tx.subscribe()) |
| 44 | } |
| 45 | |
| 46 | /// Flip the shutdown flag. Idempotent — calling twice is a |
| 47 | /// no-op, and the second call does NOT wake subscribers |
no outgoing calls
no test coverage detected