changed priority

This commit is contained in:
mcrcortex
2025-06-19 22:43:27 +10:00
parent 4d839e3662
commit ed181c1dcd

View File

@@ -29,7 +29,7 @@ public class ServiceThreadPool {
private final ThreadGroup threadGroup; private final ThreadGroup threadGroup;
public ServiceThreadPool(int threadCount) { public ServiceThreadPool(int threadCount) {
this(threadCount, 1);//Maybe change to 3 this(threadCount, 3);//Maybe change to 3
} }
public ServiceThreadPool(int threadCount, int priority) { public ServiceThreadPool(int threadCount, int priority) {
@@ -47,7 +47,7 @@ public class ServiceThreadPool {
CpuLayout.setThreadAffinity(CpuLayout.CORES[2 + (threadId % (CpuLayout.CORES.length - 2))]); CpuLayout.setThreadAffinity(CpuLayout.CORES[2 + (threadId % (CpuLayout.CORES.length - 2))]);
} }
if (threadId != 0) { if (threadId != 0) {
ThreadUtils.SetSelfThreadPriorityWin32(ThreadUtils.WIN32_THREAD_PRIORITY_LOWEST); ThreadUtils.SetSelfThreadPriorityWin32(-1);
//ThreadUtils.SetSelfThreadPriorityWin32(ThreadUtils.WIN32_THREAD_MODE_BACKGROUND_BEGIN); //ThreadUtils.SetSelfThreadPriorityWin32(ThreadUtils.WIN32_THREAD_MODE_BACKGROUND_BEGIN);
} }
this.worker(threadId); this.worker(threadId);