Notify debug: readers of new input after all input is processed

This commit is contained in:
Jeremy Soller
2022-02-14 08:49:34 -07:00
parent 1aae949fc4
commit 52ad689d37
3 changed files with 9 additions and 2 deletions
+4
View File
@@ -42,6 +42,10 @@ fn handles_mut() -> RwLockWriteGuard<'static, BTreeMap<usize, Handle>> {
/// Add to the input queue
pub fn debug_input(data: u8) {
INPUT.call_once(init_input).send(data);
}
// Notify readers of input updates
pub fn debug_notify() {
for (id, _handle) in handles().iter() {
event::trigger(SCHEME_ID.load(Ordering::SeqCst), *id, EVENT_READ);
}