Skip to content

Commit

Permalink
Unrolled build for rust-lang#122091
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#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.
  • Loading branch information
rust-timer authored Mar 7, 2024
2 parents d03b986 + 9957736 commit 4508c09
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions library/std/src/thread/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4508c09

Please sign in to comment.