What does setting Thread.Priority = Lowest really mean?

To speed up the launch of my resource-intensive application, I moved various launch tasks to the background thread and marked them with Thread.Priority = Lowest.

However, these low-priority threads still run largely in parallel with the application (since it loads its interface), as evidenced by the ANTI Profiler timeline. My understanding was that Lowest meant that the processor first processes all the higher priority threads and then receives the lower priority threads.

Is my understanding wrong?

+3
source share
3 answers

, . , , , , . , .

? / . , , .

, , , , , .

+4

, , . , , , . , , .

, -, , , , . / , .

, . , , .

+3

Is it possible to re-create your application so that the threads you are trying to wait for the user interface to load do not actually start until the user interface is loaded? This would do what you wish, making them wait until the user interface is loaded (because they are not even created / running), while the method you use makes them execute less often, but still execute.

+1
source

Source: https://habr.com/ru/post/1731478/


All Articles