Closed mochechan closed 2 years ago
Hi @mochechan, are you using different batches in the different threads? Moreover, is the mutex the same in all the threads? I don't see why it shouldn't work, when using the lock. In any case, this should not segfault but one thread could overwrite the results of another one. You should copy the detections before unlocking.
Closing for inactivity. Feel free to reopen.
I failed to use tkdnn with multithread programming. It results "Segmentation fault". I found that the key point is detNN->update by using gdb.
It is still no successful even through unique_lock is used.
The gdb shows the following debug messages.
How to use tkdnn with multithread or std::async?