From 99577368cfb74fe1b19738fdeab6608a208ee134 Mon Sep 17 00:00:00 2001 From: Chris Denton Date: Wed, 6 Mar 2024 15:42:48 +0000 Subject: [PATCH] Note why we're using a new thread in a test --- library/std/src/thread/tests.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/library/std/src/thread/tests.rs b/library/std/src/thread/tests.rs index 813ede0641530..b5195f9093f62 100644 --- a/library/std/src/thread/tests.rs +++ b/library/std/src/thread/tests.rs @@ -80,6 +80,7 @@ fn test_named_thread_truncation() { #[test] fn test_get_os_named_thread() { use crate::sys::thread::Thread; + // Spawn a new thread to avoid interfering with other tests running on this thread. let handler = thread::spawn(|| { let name = c"test me please"; Thread::set_name(name);