The current implementation of #208 does not protect the dataset synchronization thread (_DatasetFetcherThread) spawning.
In other words, since the user can click the Sync ON/OFF button rapidly, it can spawn multiple fetcher threads or induce some illegal situations.
Therefore, I want to protect the UI to ensure that the thread can be exist at most 1 at once.
How the feature is implemented
When the button is toggled, it immediately disables the button.
If the button is now "ON", spawn a thread and enable the button back.
If the button is now "OFF", stop the thread and DO NOT enable the button.
After the thread actually finishes, the finished signal will trigger to enable the button back.
Feature you want to implement
The current implementation of #208 does not protect the dataset synchronization thread (
_DatasetFetcherThread
) spawning. In other words, since the user can click the Sync ON/OFF button rapidly, it can spawn multiple fetcher threads or induce some illegal situations. Therefore, I want to protect the UI to ensure that the thread can be exist at most 1 at once.How the feature is implemented
When the button is toggled, it immediately disables the button. If the button is now "ON", spawn a thread and enable the button back. If the button is now "OFF", stop the thread and DO NOT enable the button. After the thread actually finishes, the
finished
signal will trigger to enable the button back.Also, more logging will be added.