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
This commit is contained in:
Vadim Zeitlin 2015-01-27 11:03:08 +00:00
parent a3747ac959
commit ad72c3429f
2 changed files with 7 additions and 1 deletions

View File

@ -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.

View File

@ -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);