Skip to content

Commit

Permalink
fix: Fix video thread pool early shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
chettoy committed Oct 22, 2022
1 parent 5cc72ba commit 7ff408e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions fxxkstar.py
Original file line number Diff line number Diff line change
Expand Up @@ -2952,9 +2952,14 @@ def on_done(future: Future):
future.add_done_callback(on_done)
time.sleep(1.5)

# Dispatch the first task
dispatch_task()
while len(future_list) > 0:
future_list[0].result()
# Wait for all processing to be completed
while self.video_to_watch:
while len(future_list) > 0:
future_list[0].result()
# Waiting for task creation
time.sleep(1)

thread_pool.shutdown()
print(G_STRINGS['sync_video_progress_ended'])
Expand Down

0 comments on commit 7ff408e

Please sign in to comment.