[resources] Nicely quit threads
Differential Revision: https://phabricator.kde.org/D8561
Signed-off-by: Anthony Fieroni <bvbfan@abv.bg>