Open robinechuca opened 3 weeks ago
But in a thread
Ensure that there are real threads. Because forked processes don't work: https://github.com/opencv/opencv/issues/5150
I've just checked carefully. Whether with a context fork or spawn, the function executes perfectly. However, as soon as the thread, not the process, is no longer the principal, there seems to be a conflict with the GIL.
If we start a spawn process in each sub-threads. It works. But it is extremely slow to create a new spawn process each time! But to create a fork process in each sub-thread doesn't solve anything.
Expected behaviour
In the main thread, it works well as written in the example bellow:
Actual behaviour
But in a thread, it is all broken!
When the code does not freeze by itself, an interrupt with ctrl+c leads allways to a segfault. Unlike the threadless example.
Steps to reproduce