-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mirrors: Run speed tests as GTask async operations
Quickly opening and closing the mirror selection dialog repeatedly has a chance of causing a segfault. In addition, the following Gtk critical error message is printed multiple times for every mirror that has not yet been tested at the time that the dialog is closed. Gtk-CRITICAL **: gtk_list_store_get_value: assertion 'iter_is_valid (iter, list_store)' failed. This occurs because the mirrors model gets cleared without waiting for the speed test thread to finish thus invalidating the remaining iterators. The speed tests are now run using Gio Task async operations. They are launched in new threads and when complete, the callback which is invoked from the main thread checks if the task has been cancelled and if so it does not modify the model or access the now invalid iterators.
- Loading branch information
Showing
1 changed file
with
41 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters