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):
|
def thread_login(self, context):
|
||||||
global active_thread
|
global active_thread
|
||||||
if active_thread:
|
if active_thread:
|
||||||
active_thread.kill()
|
active_thread._stop()
|
||||||
context = bpy.context
|
active_thread = threading.Thread(
|
||||||
x = threading.Thread(target=self.kitsu_session_start(context), daemon=True)
|
target=self.kitsu_session_start(context), daemon=True
|
||||||
x.start()
|
)
|
||||||
|
active_thread.start()
|
||||||
|
|
||||||
|
|
||||||
class KITSU_OT_session_end(bpy.types.Operator):
|
class KITSU_OT_session_end(bpy.types.Operator):
|
||||||
|
Loading…
Reference in New Issue
Block a user