From 32863fa767bf213f211ce42dbdc26958b2d9b327 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sat, 16 Sep 2023 13:28:14 -0600 Subject: [PATCH] Add thread name for flock thread --- src/flock.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/flock.rs b/src/flock.rs index 9cb3fba..ec02384 100644 --- a/src/flock.rs +++ b/src/flock.rs @@ -59,7 +59,8 @@ impl FileLock { Some(lockfile) => lockfile, }; let done = Arc::new(AtomicBool::new(false)); - thread::Builder::new().spawn({ + let thread = thread::Builder::new().name("trybuild-flock".to_owned()); + thread.spawn({ let done = Arc::clone(&done); move || poll(lockfile, done) })?;