Wrap application initialization with Runtime::enter
This commit is contained in:
parent
cf53026b51
commit
75d8de93ae
1 changed files with 2 additions and 2 deletions
|
|
@ -123,10 +123,10 @@ pub trait Application: Sized {
|
||||||
Runtime::new(executor, Proxy::new(event_loop.create_proxy()))
|
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);
|
runtime.spawn(init_command);
|
||||||
|
|
||||||
let subscription = application.subscription();
|
let subscription = runtime.enter(|| application.subscription());
|
||||||
runtime.track(subscription);
|
runtime.track(subscription);
|
||||||
|
|
||||||
let mut title = application.title();
|
let mut title = application.title();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue