From 2168793dc75380a485faa4d470489d3d8baed0dc Mon Sep 17 00:00:00 2001 From: kxt Date: Mon, 24 May 2021 15:00:49 +0200 Subject: fix(pty): use async io to avoid polling (#523) This patch fixes #509 by using async read instead of polling a non-blocking fd. This reduces CPU usage when the ptys are idle. --- Cargo.lock | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Cargo.lock') diff --git a/Cargo.lock b/Cargo.lock index 48aa2bf2c..0dda83734 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -170,6 +170,17 @@ version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e91831deabf0d6d7ec49552e489aed63b7456a7a3c46cff62adad428110b0af0" +[[package]] +name = "async-trait" +version = "0.1.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b98e84bbb4cbcdd97da190ba0c58a1bb0de2c1fdf67d159e192ed766aeca722" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "atomic-waker" version = "1.0.0" @@ -2308,6 +2319,7 @@ name = "zellij-server" version = "0.12.0" dependencies = [ "ansi_term 0.12.1", + "async-trait", "daemonize", "insta", "serde_json", -- cgit v1.2.3