Blender Kitsu: Use Background Thread for Kitsu Login #79

Merged
Nick Alberelli merged 6 commits from fix/blender-kitsu-bg-threading into main 2023-06-16 17:44:21 +02:00
Showing only changes of commit ee7da5d857 - Show all commits

View File

@ -95,10 +95,11 @@ class KITSU_OT_session_start(bpy.types.Operator):
def thread_login(self, context):
global active_thread
if active_thread:
active_thread.kill()
context = bpy.context
x = threading.Thread(target=self.kitsu_session_start(context), daemon=True)
x.start()
active_thread._stop()
active_thread = threading.Thread(
target=self.kitsu_session_start(context), daemon=True
)
active_thread.start()
class KITSU_OT_session_end(bpy.types.Operator):