Module: wine Branch: master Commit: ed666db8d8d6afd740a266584a38e08622474821 URL: https://gitlab.winehq.org/wine/wine/-/commit/ed666db8d8d6afd740a266584a38e08...
Author: Brendan Shanks bshanks@codeweavers.com Date: Wed Nov 2 11:09:00 2022 -0700
ntdll: Set the QoS class of the main Wine thread on macOS.
---
dlls/ntdll/unix/loader.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c index bca6db5bfe8..3295f7f918b 100644 --- a/dlls/ntdll/unix/loader.c +++ b/dlls/ntdll/unix/loader.c @@ -2335,6 +2335,9 @@ static void apple_create_wine_thread( void *arg )
pthread_attr_init( &attr ); pthread_attr_setdetachstate( &attr, PTHREAD_CREATE_JOINABLE ); + /* Use the same QoS class as the process main thread (user-interactive). */ + if (pthread_attr_set_qos_class_np) + pthread_attr_set_qos_class_np( &attr, QOS_CLASS_USER_INTERACTIVE, 0 ); if (pthread_create( &thread, &attr, apple_wine_thread, NULL )) exit(1); pthread_attr_destroy( &attr ); }