cros_async: show debug log when setting the default executor.

Show the debug log to tell the configured default async executor
backend.

BUG=b:251289312
TEST=confirmed the debug log is shown by --async-executor option

Change-Id: I82f040d2ad19739cd486945bae2b5d99492a62a1
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4006066
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
This commit is contained in:
Takaya Saeki 2022-11-07 10:20:44 +00:00 committed by crosvm LUCI
parent 303c285b7f
commit b9295d8ba9

View file

@ -5,6 +5,7 @@
use std::future::Future;
use async_task::Task;
use base::debug;
use base::warn;
use base::AsRawDescriptors;
use base::RawDescriptor;
@ -224,6 +225,7 @@ impl Executor {
}
}
debug!("setting the default executor to {:?}", executor_kind);
DEFAULT_EXECUTOR_KIND.set(executor_kind).map_err(|_|
// `expect` succeeds since this closure runs only when DEFAULT_EXECUTOR_KIND is set.
SetDefaultExecutorKindError::SetMoreThanOnce(