Elevate priorities for the UDP relay threads

This commit is contained in:
Cameron Gutman
2020-08-11 01:12:48 -07:00
parent b6508d9024
commit 944c8993e8
2 changed files with 7 additions and 0 deletions
+4
View File
@@ -868,6 +868,10 @@ int Run()
ResetLogFile();
// Bump the process priority class to above normal. The UDP relay threads will
// further raise their own thread priorities to avoid preemption by other activity.
SetPriorityClass(GetCurrentProcess(), ABOVE_NORMAL_PRIORITY_CLASS);
// Create the UDP alternate port relays
for (int i = 0; i < ARRAYSIZE(k_Ports); i++) {
if (k_Ports[i].proto == IPPROTO_UDP) {