brokkr / poca

A fast, multithreaded and highly customizable command line podcast client, written in Python 3
GNU General Public License v3.0
23 stars 4 forks source link

Put state updater into a thread of it's own #157

Open brokkr opened 3 years ago

brokkr commented 3 years ago

Currently state is being updated from the outer loop and after all threads have been joined. That holds up the main action and risks loosing updates if script crashes or is Ctrl-C'ed. Status updating belongs in a thread of it's own, so that updates can be written to state.yaml as soon as the threads drop them into state_q.