commontk / CTK

A set of common support code for medical imaging, surgical navigation, and related purposes.
https://commontk.org
Apache License 2.0
855 stars 490 forks source link

found a bug in the file CTK/Plugins/org.commontk.eventadmin/tasks /ctkEASyncDeliverTasks.tpp #1156

Open HBing110 opened 10 months ago

HBing110 commented 10 months ago

CTK/Plugins/org.commontk.eventadmin/tasks /ctkEASyncDeliverTasks.tpp

139 line

After the entire project is initiated, there is only one instance of syncMasterThread. However, when multiple threads execute simultaneously, data may become disordered or duplicated.

HBing110 commented 10 months ago

1、 I added a line before line 139: ctkEASyncMasterThread* syncMasterThread = new ctkEASyncMasterThread(); Running with high concurrency, the data is fine, but I haven't found a suitable place to release memory.

2、 Modify line 139: { QMutexLocker l(&mutex1); syncMasterThread->syncRun(&runnable); } Inefficient, simultaneous nested message sending causing deadlock.

Hopes for assistance in resolving this bug. . Thank you.