Thread Priority Questions

What is the effect of higher thread priority when use when in the range of OS_THREAD_PRIORITY_DEFAULT (2) up to OS_THREAD_PRIORITY_NETWORK (6)? Does it make a difference if I use 3, 4 or 5, if I only have 1 additional user thread?

If I create a new thread that has a higher priority than the main loop, is there anything I need to do, from the higher priority thread, like calling Particle.process()?

I am using the msom on 6.2.0 if that is relevant at all.

A higher priority thread is at or after its scheduled execution time will get it before any lower priority threads.

A thread can yield its timeslice by calling delay(), a mutex wait on an unavailable resource, returning from the loop thread, and some other cases.

If you create a high priority thread you definitely must yield, otherwise the loop thread will not run properly.

1 Like