Blender Kitsu: Use Background Thread for Kitsu Login #79
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user