From ad72c3429fd3746f18a15af3f798be0c99fff492 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 27 Jan 2015 11:03:08 +0000 Subject: [PATCH] Improve wxThread::SetPriority() comment and documentation. Don't claim that SetPriority() can only be called before the thread is created, this is just wrong. Do document that it must be done after creating the thread in wxMSW (this is a limitation of this port as POSIX implementation allows calling it at any moment and could be lifted in the future). Closes #16809. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78418 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/thread.h | 3 ++- interface/wx/thread.h | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/include/wx/thread.h b/include/wx/thread.h index 54fbc502fb..5ff109c970 100644 --- a/include/wx/thread.h +++ b/include/wx/thread.h @@ -560,7 +560,8 @@ public: // Sets the priority to "prio" which must be in 0..100 range (see // also wxPRIORITY_XXX constants). // - // NB: the priority can only be set before the thread is created + // NB: under MSW the priority can only be set after the thread is + // created (but possibly before it is launched) void SetPriority(unsigned int prio); // Get the current priority. diff --git a/interface/wx/thread.h b/interface/wx/thread.h index 444b359417..17c68a84f4 100644 --- a/interface/wx/thread.h +++ b/interface/wx/thread.h @@ -1258,6 +1258,11 @@ public: - @c wxPRIORITY_MIN: 0 - @c wxPRIORITY_DEFAULT: 50 - @c wxPRIORITY_MAX: 100 + + Notice that in the MSW implementation the thread priority can currently + be only set after creating the thread with CreateThread(). But under + all platforms this method can be called either before launching the + thread using Run() or after doing it. */ void SetPriority(unsigned int priority);