Threading
os_thread_prio_t - Threading
When creating a thread, you pass a os_thread_prio_t
. If you omit the parameter, OS_THREAD_PRIORITY_DEFAULT
is used, which is generally a good default value.
Constant | Value |
---|---|
OS_THREAD_PRIORITY_DEFAULT |
2 |
OS_THREAD_PRIORITY_NETWORK |
7 |
OS_THREAD_PRIORITY_NETWORK_HIGH |
8 |
OS_THREAD_PRIORITY_CRITICAL |
9 |
The valid range is from 0 to 9, inclusive, however it's recommended that user threads only use 1 to 6, inclusive, and having a thread a higher priority than networking can lead to poor system performance.