You can use
to limit the number of threads.Qt Code:
QThreadPool::globalInstance->setMaxThreadCount()To copy to clipboard, switch view to plain text mode
And if your application still is crashing, you are probably still accessing a shared variable in an unsafe way. I'm thinking of myList and allFiles.
It sounds like QtConcurrent::mappedReduced could be a candidate for you.
Bookmarks