mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-07-23 11:37:28 +02:00
Bug threadpool
This commit is contained in:
parent
d32c3df1d0
commit
a0dc87c19b
3 changed files with 12 additions and 0 deletions
|
@ -62,6 +62,10 @@ class ThumbnailCache(QObject):
|
|||
cleaningThread = None
|
||||
workerThreads = ThreadPool(processes=3)
|
||||
|
||||
def __del__(self):
|
||||
self.workerThreads.terminate()
|
||||
self.workerThreads.join()
|
||||
|
||||
@staticmethod
|
||||
def initialize():
|
||||
"""Initialize static fields in cache class and cache directory on disk."""
|
||||
|
|
|
@ -48,6 +48,10 @@ class FilesModTimePollerThread(QObject):
|
|||
else:
|
||||
self._filePollerRefresh = PollerRefreshStatus.DISABLED
|
||||
|
||||
def __del__(self):
|
||||
self._threadPool.terminate()
|
||||
self._threadPool.join()
|
||||
|
||||
def start(self, files=None):
|
||||
""" Start polling thread.
|
||||
|
||||
|
|
|
@ -452,6 +452,10 @@ class Reconstruction(UIGraph):
|
|||
|
||||
self.setDefaultPipeline(defaultPipeline)
|
||||
|
||||
def __del__(self):
|
||||
self._workerThreads.terminate()
|
||||
self._workerThreads.join()
|
||||
|
||||
def clear(self):
|
||||
self.clearActiveNodes()
|
||||
super(Reconstruction, self).clear()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue