Wrap application initialization with `Runtime::enter`
This commit is contained in:
parent
cf53026b51
commit
75d8de93ae
|
@ -123,10 +123,10 @@ pub trait Application: Sized {
|
|||
Runtime::new(executor, Proxy::new(event_loop.create_proxy()))
|
||||
};
|
||||
|
||||
let (mut application, init_command) = Self::new();
|
||||
let (mut application, init_command) = runtime.enter(|| Self::new());
|
||||
runtime.spawn(init_command);
|
||||
|
||||
let subscription = application.subscription();
|
||||
let subscription = runtime.enter(|| application.subscription());
|
||||
runtime.track(subscription);
|
||||
|
||||
let mut title = application.title();
|
||||
|
|
Loading…
Reference in New Issue