main: Moved event loop definition close to actor

This commit is contained in:
Dorota Czaplejewicz
2022-11-28 15:46:05 +00:00
parent e5be92efae
commit 6d01386d8a
6 changed files with 27 additions and 23 deletions

View File

@ -1,15 +1,15 @@
/*! Defines the application-wide message bus for updating state.*/
use crate::event_loop::driver::Threaded;
use crate::main;
pub mod c {
use super::*;
use crate::util::c::Wrapped;
pub type State = Wrapped<Threaded>;
pub type State = Wrapped<main::EventLoop>;
}
// The state receiver is an endpoint of a channel, so it's safely cloneable.
// There's no need to keep it in a Rc.
// The C version uses Wrapped with an underlying Rc,
// because Wrapped is well-tested already.
pub type State = Threaded;
pub type State = main::EventLoop;