Introduce daemon API and unify shell runtimes

This commit is contained in:
Héctor Ramón Jiménez 2024-06-19 01:53:40 +02:00
parent 368b15f708
commit 341c9a3c12
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
54 changed files with 1352 additions and 2677 deletions

View file

@ -78,11 +78,22 @@ impl<T: 'static> Proxy<T> {
/// Note: This skips the backpressure mechanism with an unbounded
/// channel. Use sparingly!
pub fn send(&mut self, value: T)
where
T: std::fmt::Debug,
{
self.send_action(Action::Output(value));
}
/// Sends an action to the event loop.
///
/// Note: This skips the backpressure mechanism with an unbounded
/// channel. Use sparingly!
pub fn send_action(&mut self, action: Action<T>)
where
T: std::fmt::Debug,
{
self.raw
.send_event(Action::Output(value))
.send_event(action)
.expect("Send message to event loop");
}