diff rust/chg/src/main.rs @ 44755:4b0185841058

rust-chg: do not terminate tokio runtime until pager exits We no longer need to spawn a task just to keep the pager handle. The pager handle can be held by ChgUiHandler since the handler itself is not consumed and recreated across async calls. Differential Revision: https://phab.mercurial-scm.org/D8449
author Yuya Nishihara <yuya@tcha.org>
date Sat, 11 Apr 2020 02:51:03 +0900
parents 9fc9526e283a
children
line wrap: on
line diff
--- a/rust/chg/src/main.rs	Sat Apr 11 02:21:06 2020 +0900
+++ b/rust/chg/src/main.rs	Sat Apr 11 02:51:03 2020 +0900
@@ -83,5 +83,6 @@
         .run_command_chg(&mut handler, env::args_os().skip(1))
         .await?;
     procutil::restore_signal_handler_once()?;
+    handler.wait_pager().await?;
     Ok(code)
 }