From 01fab82edcdedcdcdc4dadd21cb97ab282761779 Mon Sep 17 00:00:00 2001 From: crs Date: Tue, 20 May 2003 19:14:24 +0000 Subject: [PATCH] Reduced maximum priority in debug build. --- lib/arch/CArchMultithreadWindows.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/arch/CArchMultithreadWindows.cpp b/lib/arch/CArchMultithreadWindows.cpp index 4934fc36..ba2fef6d 100644 --- a/lib/arch/CArchMultithreadWindows.cpp +++ b/lib/arch/CArchMultithreadWindows.cpp @@ -378,7 +378,12 @@ CArchMultithreadWindows::setPriorityOfThread(CArchThread thread, int n) { REALTIME_PRIORITY_CLASS, THREAD_PRIORITY_HIGHEST }, { REALTIME_PRIORITY_CLASS, THREAD_PRIORITY_TIME_CRITICAL} }; +#if defined(_DEBUG) + // don't use really high priorities when debugging + static const size_t s_pMax = 13; +#else static const size_t s_pMax = sizeof(s_pClass) / sizeof(s_pClass[0]) - 1; +#endif static const size_t s_pBase = 8; // index of normal priority assert(thread != NULL);