This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Why is CONFIG_MAIN_THREAD_PRIORITY=7 in mqtt_simpe?

CONFIG_MAIN_THREAD_PRIORITY=7

I read prj.conf of mqtt_simple. Why is the value of 7 given?

https://github.com/NordicPlayground/fw-nrfconnect-nrf/blob/master/samples/nrf9160/mqtt_simple/prj.conf

This is definition of  CONFIG_MAIN_THREAD_PRIORITY.

https://docs.zephyrproject.org/1.13.0/reference/kconfig/CONFIG_MAIN_THREAD_PRIORITY.html

Does larger value mean higher priority?

Why is it set 7 while the default value is 0?

Thanks.

Parents Reply
  • That depends on what you are planing with your application. 

    You do not need to change it, but you could if you want some threads to be prioritized over the other.

    To understand how this works I would recommend checking out the documentation links posted in my last post.

Children
No Data