Xojo.Threading.Thread.Priority

From Xojo Documentation

Property (As Integer )
aXojo.Threading.Thread.Priority = newIntegerValue
or
IntegerValue = aXojo.Threading.Thread.Priority

Supported for all project types and targets.

Indicates the priority of the thread.

Notes

The main thread for the app has a priority of 5. You can alter the priority of your own threads to give them more or less time relative to the main thread. The default is also 5.

The higher the priority value, the more time the thread is allocated, in relation to the main thread. For example, if you set the Priority = 10, then your thread will run twice as often as the main thread (since 10 is 5*2). A Priority value that is too high might prevent other threads from running at all.

Sample Code

Set the thread to a low priority:

Thread1.Priority = Thread.PriorityLow