You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add `App::run_return` function. Contrary to `App::run`, this will **not** exit the process but instead return the requested exit-code. This allows the host app to perform further cleanup after Tauri has exited. `App::run_return` is not available on iOS and fallbacks to the regular `App::run` functionality.
8
+
9
+
The `App::run_iteration` function is deprecated as part of this because calling it in a loop - as suggested by the name - will cause a busy-loop.
let event = on_event_loop_event(&app_handle,RuntimeRunEvent::Ready,&manager);
1229
+
callback(&app_handle, event);
1230
+
}
1231
+
RuntimeRunEvent::Exit => {
1232
+
let event = on_event_loop_event(&app_handle,RuntimeRunEvent::Exit,&manager);
1233
+
callback(&app_handle, event);
1234
+
app_handle.cleanup_before_exit();
1235
+
}
1236
+
_ => {
1237
+
let event = on_event_loop_event(&app_handle, event,&manager);
1238
+
callback(&app_handle, event);
1239
+
}
1240
+
})
1241
+
}
1242
+
1182
1243
/// Runs an iteration of the runtime event loop and immediately return.
1183
1244
///
1184
1245
/// Note that when using this API, app cleanup is not automatically done.
@@ -1202,6 +1263,9 @@ impl<R: Runtime> App<R> {
1202
1263
/// }
1203
1264
/// ```
1204
1265
#[cfg(desktop)]
1266
+
#[deprecated(
1267
+
note = "When called in a loop (as suggested by the name), this function will busy-loop. To re-gain control of control flow after the app has exited, use `App::run_return` instead."
0 commit comments