Fix Krita discarding native threads every couple of seconds
For years Krita has been spawning native threads carelessly. It happened because of the implementation of QThreadPool::waitForDone(), which discards threads on every successful call. We once had a patch for that (9c34fef3), but it has been reverted due to deadlock regressions it introduced. This patch adds a bit different implementation of the waiting strategy, so (I hope) it won't cause any deadlocks. BUG:367901 BUG:360677
Loading