MCPcopy Index your code
hub / github.com/endbasic/endbasic / wait_one_signal

Method wait_one_signal

sdl/src/console.rs:438–448  ·  view source on GitHub ↗

Synchronously waits for the reception of just one signal.

(&self)

Source from the content-addressed store, hash-verified

436
437 /// Synchronously waits for the reception of just one signal.
438 pub fn wait_one_signal(&self) -> Signal {
439 let signal = block_on(self.signals_rx.recv()).unwrap();
440
441 match self.signals_rx.try_recv() {
442 Ok(signal) => panic!("Received duplicate signal {:?}", signal),
443 Err(TryRecvError::Empty) => (),
444 Err(TryRecvError::Closed) => panic!("Channel must be alive"),
445 }
446
447 signal
448 }
449
450 /// Injects an SDL event into the console.
451 pub fn push_event(&self, ev: Event) {

Callers

nothing calls this directly

Calls 2

recvMethod · 0.80
try_recvMethod · 0.80

Tested by

no test coverage detected