From 37c0f615cf0cc6817fd7d7a70c36b6d5c0fb4f2c Mon Sep 17 00:00:00 2001 From: John Nunley Date: Wed, 8 Feb 2023 12:39:01 -0800 Subject: [PATCH] On Windows, name the waiter thread (#2672) --- src/platform_impl/windows/event_loop.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/platform_impl/windows/event_loop.rs b/src/platform_impl/windows/event_loop.rs index 963a3830..6d5f9d44 100644 --- a/src/platform_impl/windows/event_loop.rs +++ b/src/platform_impl/windows/event_loop.rs @@ -205,7 +205,10 @@ impl EventLoop { let thread_msg_target = create_event_target_window::(); - thread::spawn(move || wait_thread(thread_id, thread_msg_target)); + thread::Builder::new() + .name("winit wait thread".to_string()) + .spawn(move || wait_thread(thread_id, thread_msg_target)) + .expect("Failed to spawn winit wait thread"); let wait_thread_id = get_wait_thread_id(); let runner_shared = Rc::new(EventLoopRunner::new(thread_msg_target, wait_thread_id));