LVGL support on LV_USE_OS = LV_OS_PTHREAD

I have been using LVGL 9.3 on linux for a while, which I currently discovered that LVGL will create a render thread in draw_sw while using LV_USE_OS = LV_OS_PTHREAD. I am wondering would this thread cause memory access issue with my timer handler thread, which it seems the rendering thread is directly accessing the pointer of text in lv label, and I cant see things like lv_lock() in the rendering thread similar to that in lv timer handler? Is that a problem or did I overlooked something? Thanks!

i.e. To be clear, I have called lv_timer_handler() in a seperate thread with certain delay, while all changes to the lvgl objects are all happened inside this timer handler thread. I have enabled LV_USE_OS = LV_OS_PTHREAD and discovered that there is a render thread created inside lvgl implementation in lv_draw_sw.c

Hi @GaryL. If I understood you correctly, you must call lv_lock and lv_unlock every time you are going to interact with LVGL objects if you are using LV_USE_OS. In your case, you said that you call lv_timer_handler in another thread and make changes to objects inside that thread, right? If so, you must call the mutex between changes.

Also worth to mention that lv_timer_handler() uses lv_lock() and lv_unlock() as mention here: Operating system and interrupts — LVGL documentation

The drawing task uses mutex too, on the implementation of lv_mutex_init() it passes the global mutex to the choosed OS implementation:

So as long you are using lv_lock() and lv_unlock() while interacting with lvgl objects you should have no problem.