Index: clangd/Threading.cpp =================================================================== --- clangd/Threading.cpp +++ clangd/Threading.cpp @@ -9,6 +9,8 @@ #include #elif defined(__APPLE__) #include +#elif defined (_WIN32) +#include #endif namespace clang { @@ -129,6 +131,11 @@ Priority == ThreadPriority::Low && !AvoidThreadStarvation ? PRIO_DARWIN_BG : 0); +#elif defined(_WIN32) + SetThreadPriority(GetCurrentThread(), + Priority == ThreadPriority::Low && !AvoidThreadStarvation + ? THREAD_MODE_BACKGROUND_BEGIN + : THREAD_MODE_BACKGROUND_END); #endif }