On 11 Feb 2010, at 01:10, Seth Grover wrote:
http://www.hu.freepascal.org/docs-html/rtl/system/threadsetpriority.html 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: http://community.freepascal.org:10000/docs-html/rtl/classes/tthreadpriority.html which has some enumerations. How do those come into play? Are those just for TThread descendents?
Yes.
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.
Jonas _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal