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
Member

Closes: studio/blender-studio-pipeline#18

What's Changed

  • Use BG Thread when loggin in
  • BG Thread is restarted if user restarts login process
Closes: https://projects.blender.org/studio/blender-studio-pipeline/issues/18 ### What's Changed - Use BG Thread when loggin in - BG Thread is restarted if user restarts login process
Nick Alberelli added 1 commit 2023-06-14 23:07:14 +02:00
Nick Alberelli requested review from Sebastian Parborg 2023-06-14 23:09:23 +02:00

How does this work?
I thought that you needed to manually start the thread and also check if there were any current threads running before starting a new one.

There doesn't seem to be any logic for any of that. So even if the thread gets started automatically, it seems like there can be race conditions now as nothing is preventing it from running multiple threads with the same task at the same time.

How does this work? I thought that you needed to manually start the thread and also check if there were any current threads running before starting a new one. There doesn't seem to be any logic for any of that. So even if the thread gets started automatically, it seems like there can be race conditions now as nothing is preventing it from running multiple threads with the same task at the same time.
Nick Alberelli changed title from Blender Kitsu: Use Background Thread for Kitsu Login to WIP: Blender Kitsu: Use Background Thread for Kitsu Login 2023-06-15 17:05:48 +02:00
Author
Member

TODO

  • Create a global variable for the thread
  • Check thread if its already running before starting a new one
  • SO when we get into the function is the thread currently running do nothing
## TODO - Create a global variable for the thread - Check thread if its already running before starting a new one - SO when we get into the function is the thread currently running do nothing
Nick Alberelli added 1 commit 2023-06-16 04:26:55 +02:00
Nick Alberelli force-pushed fix/blender-kitsu-bg-threading from 025bb735ce to 8a037fd216 2023-06-16 04:48:11 +02:00 Compare
Nick Alberelli added 1 commit 2023-06-16 04:50:42 +02:00
Author
Member

@ZedDB could you take a look at this now, I have added some logic that checks if a thread is running. I decided instead of doing nothing to kill the thread and restart to provide a better experience for users who are trying multiple times to login with incorrect creds, let me know what u think :)

@ZedDB could you take a look at this now, I have added some logic that checks if a thread is running. I decided instead of doing nothing to kill the thread and restart to provide a better experience for users who are trying multiple times to login with incorrect creds, let me know what u think :)
Nick Alberelli force-pushed fix/blender-kitsu-bg-threading from bf568b2d4e to ee7da5d857 2023-06-16 05:10:14 +02:00 Compare
Nick Alberelli added 1 commit 2023-06-16 05:16:56 +02:00
Nick Alberelli changed title from WIP: Blender Kitsu: Use Background Thread for Kitsu Login to Blender Kitsu: Use Background Thread for Kitsu Login 2023-06-16 05:17:44 +02:00
Nick Alberelli force-pushed fix/blender-kitsu-bg-threading from a286983238 to ed2c588b52 2023-06-16 16:38:27 +02:00 Compare
Nick Alberelli merged commit 32b7fc0c49 into main 2023-06-16 17:44:21 +02:00
Nick Alberelli deleted branch fix/blender-kitsu-bg-threading 2023-06-16 17:44:21 +02:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: studio/blender-studio-tools#79
No description provided.