1
0
Fork 0
mirror of https://github.com/borgbase/vorta synced 2024-12-22 15:57:34 +00:00

Fixes #2120 (ammended)

This commit is contained in:
mycir 2024-11-22 10:40:49 +00:00
parent 84fbf14dde
commit 420be650c0

View file

@ -58,9 +58,13 @@ def __init__(self, decorator_instance, wrapped_instance):
self.wrapped_instance = wrapped_instance self.wrapped_instance = wrapped_instance
def __call__(self, *args, **kwargs): def __call__(self, *args, **kwargs):
global runner_thread self.runner = AsyncRunner.Runner(self.decorator_instance, self.wrapped_instance, *args, **kwargs)
runner_thread = AsyncRunner.Runner(self.decorator_instance, self.wrapped_instance, *args, **kwargs) self.runner.finished.connect(self.runner_finished)
runner_thread.start() self.runner.start()
def runner_finished(self):
self.runner.wait(100)
self.runner = None
class Runner(QtCore.QThread): class Runner(QtCore.QThread):
def __init__(self, decorator_instance, wrapped_instance, *args, **kwargs): def __init__(self, decorator_instance, wrapped_instance, *args, **kwargs):
@ -72,8 +76,11 @@ def __init__(self, decorator_instance, wrapped_instance, *args, **kwargs):
def run(self): def run(self):
self.decorator_instance(self.wrapped_instance, *self.args, **self.kwargs) self.decorator_instance(self.wrapped_instance, *self.args, **self.kwargs)
<<<<<<< HEAD
self.terminate() self.terminate()
self.wait() self.wait()
=======
>>>>>>> d7d1488 (Fixes #2120 (ammended))
class FilePathInfoAsync(QThread): class FilePathInfoAsync(QThread):