Skip to content

Commit 3fc4cf6

Browse files
authored
Rollup merge of #122091 - ChrisDenton:comment, r=RalfJung
Note why we're using a new thread in `test_get_os_named_thread` `@RalfJung` expressed some "surprise and confusion" about why we're spawning a new thread in this test. Hopefully this comment will help future readers.
2 parents 7cf69c0 + 9957736 commit 3fc4cf6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

library/std/src/thread/tests.rs

+1
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ fn test_named_thread_truncation() {
8080
#[test]
8181
fn test_get_os_named_thread() {
8282
use crate::sys::thread::Thread;
83+
// Spawn a new thread to avoid interfering with other tests running on this thread.
8384
let handler = thread::spawn(|| {
8485
let name = c"test me please";
8586
Thread::set_name(name);

0 commit comments

Comments
 (0)