Spawn worktree scanning on the scoped pool

Co-Authored-By: Brooks Swinnerton <934497+bswinnerton@users.noreply.github.com>
This commit is contained in:
Nathan Sobo 2021-04-13 19:45:02 -06:00
parent e4f41de7bf
commit 26f9127e83

View File

@ -74,7 +74,7 @@ impl Worktree {
{
let tree = tree.clone();
std::thread::spawn(move || {
ctx.app().scoped_pool().spawn(move || {
if let Err(error) = tree.scan_dirs() {
log::error!("error scanning worktree: {}", error);
}