Emit events from account manager

Errors and warnings are emitted with a special 0 account ID.
This commit is contained in:
link2xt
2021-09-25 13:02:30 +00:00
parent 89d8b26192
commit 2309c7ca13
4 changed files with 68 additions and 34 deletions

View File

@@ -62,10 +62,6 @@ impl Events {
pub struct EventEmitter(Receiver<Event>);
impl EventEmitter {
pub(crate) fn into_inner(self) -> Receiver<Event> {
self.0
}
/// Blocking recv of an event. Return `None` if the `Sender` has been droped.
pub fn recv_sync(&self) -> Option<Event> {
async_std::task::block_on(self.recv())