Skip to content

Commit

Permalink
Fix My Subscription thread loop timing out too early anxdpanic#882
Browse files Browse the repository at this point in the history
  • Loading branch information
MoojMidge committed Aug 24, 2024
1 parent 09722b4 commit bcbe935
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion resources/lib/youtube_plugin/youtube/client/youtube.py
Original file line number Diff line number Diff line change
Expand Up @@ -1662,6 +1662,7 @@ def _threaded_fetch(kwargs,
threads['pool_counts'][pool_id] -= 1
threads['pool_counts']['all'] -= 1
threads['current'].discard(current_thread)
threads['loop'].set()

try:
num_cores = cpu_count() or 1
Expand Down Expand Up @@ -1710,7 +1711,7 @@ def _threaded_fetch(kwargs,
completed = []
iterator = iter(payloads)
threads['loop'].set()
while threads['loop'].wait(1):
while threads['loop'].wait():
try:
pool_id = next(iterator)
except StopIteration:
Expand Down

0 comments on commit bcbe935

Please sign in to comment.