ok/jj
1
0
Fork 0
forked from mirrors/jj

watchman: use single-threaded async runtime

The `#[tokio::main]` annotation uses a multi-threaded runtime by
default. We don't need that for querying watchman. Switching to the
single-threaded runtime saves about 20 ms.
This commit is contained in:
Martin von Zweigbergk 2023-09-24 13:59:29 -07:00 committed by Martin von Zweigbergk
parent ca6371ccde
commit 9d8be29d94

View file

@ -623,7 +623,7 @@ impl TreeState {
}
#[cfg(feature = "watchman")]
#[tokio::main]
#[tokio::main(flavor = "current_thread")]
#[instrument(skip(self))]
pub async fn query_watchman(
&self,