[fpc-pascal] values for ThreadSetPriority
jonas.maebe at elis.ugent.be
Thu Feb 11 10:43:40 CET 2010
On 11 Feb 2010, at 01:10, Seth Grover wrote:
> says that it takes for a priority values from -15 to 15. The comment
> to the right of the declaration says that "0" is normal. Are these
> numbers like nice's, where negative numbers are more favorable (higher
> priority) and positive numbers are less favorable (lower priority)?
This function is currently only hooked up for Windows and is mapped
directly to the "WinThreadSetPriority" win32 api function (which
directly takes these inputs). Whatever MSDN defines as the meaning of
that parameter is what it will also mean on other platforms, when/if
it's hooked up there.
> Also, to further confuse my mind, I found this:
> which has some enumerations. How do those come into play? Are those
> just for TThread descendents?
> I'm just trying to find the correct cross-platform approach for
> changing thread priority of threads started with BeginThread.
In theory the function to use would be system.threadsetpriority, but
in practice this will only work on Windows currently.
More information about the fpc-pascal