Openmv _thread module support?

In OPENMV2 board, try to utilize the mpy thread functionality. Upset, the function is not working fine. three thread are scheduled by around 10s interval. Code as below:

import pyb
import time
import _thread

def led(id, dt):
    while 1:

#led(2, 1000)   
_thread.start_new_thread(led, (1, 1000))
_thread.start_new_thread(led, (2, 1000))
_thread.start_new_thread(led, (3, 1000))

By comparing with pyboard, after enable the _thread module in mpconfiguration.h, the _thread func working well. thread are scheduling as multi-thread working.
in mpconfiguration.h for pyboard

#define MICROPY_PY_THREAD           (1)
#define MICROPY_PY_THREAD_GIL       (1)

Thus, whether there is extra more configuration needed in OpenMV project to enable the thread function?
Kindly waiting for your support

Threading doesn’t work very well with our code, probably due to this bug with pendsv handler:

Hi, it here any plan of the problem fix? that is very upset the thread not work. some porting code need to adapt by this.

Also tested on micropython trunk. mutlithread is working fine. :stuck_out_tongue:

It works in Micropyhton because they don’t use this patch, we use this patch because this bug affects the IDE (causes the camera to crash when the script is started/stopped). There’s No plan to support threading before this issue is fixed in Micropython first.

would you help to highlight the patch. in my work, multithread support is more important than OPENMV IDE works. so I tend to remove that patch temporarily.

Thanks iabdalkader, but after remove this patch, multithread in OPENMV board is still not working fine. is that so, before this patch, openmv can support multthread before? or anything else I missed