Wait for worker threads to finish before quitting.
commit3c62528ec9f94295b051baefc2587d9a32dbf76b
authorauouymous <au@qzx.com>
Wed, 22 Jun 2022 19:51:23 +0000 (22 13:51 -0600)
committerauouymous <au@qzx.com>
Wed, 22 Jun 2022 19:51:23 +0000 (22 13:51 -0600)
tree46d0b4491357ca65bf275b8ebd211b4e075b508d
parentb1bd429be0d898cce5f40903c778fcc03d34d724
Wait for worker threads to finish before quitting.

Closing gpodder while tasks are downloading or pausing causes a hang and
must be killed from task manager or interrupted if launched from command
line. This was introduced in ed5d18e1b04f5e32b18d90b3da151a57ae507571
but only applicable when using python 3.10. The idle_add() callback is
no longer invoked to wake up the dequeue wait_for() condition, likely
due to the main thread terminating early, which didn't happen in older
python versions. Simply waiting for all worker threads to terminate
fixes the issue.

Fixes #1306.
src/gpodder/download.py
src/gpodder/gtkui/main.py