Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
6.5.3
-
None
Description
I am using QThreadPool to run a worker that has a function to create and then clear a huge QVector and write a huge file. However, every time one worker reaches that line (QVector::clear/QFile::close), all the threads freeze and will continue when it is finished.
Do you think it is a bug, or is that a natural way of clearing the vector in QThread?
It would be good if other threads could still run normally when one of the workers runs those two functions (QVector::clear/QFile::close). For QFile::close, I tried using QFile::flush in my iteration instead of close() at the end of iterations, but it's not helping the performance.
I attached codes when the thread gets slower when clearing the vector.