[gnome-music/wip/mschraal/file-exists-async: 45/53] Rework I/O priorities slightly
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/file-exists-async: 45/53] Rework I/O priorities slightly
- Date: Sun, 29 Aug 2021 09:06:53 +0000 (UTC)
commit 8652e8cfcd8f2acfdb8ebd1f9b53d1677cbbc2cf
Author: Marinus Schraal <mschraal gnome org>
Date: Sun Aug 15 22:50:47 2021 +0200
Rework I/O priorities slightly
* Make the albumsview on demand cover loading priority a higher as it is
the main view.
* Bring FileExistsAsync in line with the other priorities.
gnomemusic/fileexistsasync.py | 2 +-
gnomemusic/views/albumsview.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gnomemusic/fileexistsasync.py b/gnomemusic/fileexistsasync.py
index c97a521fa..408abc009 100644
--- a/gnomemusic/fileexistsasync.py
+++ b/gnomemusic/fileexistsasync.py
@@ -47,7 +47,7 @@ class FileExistsAsync(GObject.GObject):
"""
thumb_file.query_info_async(
Gio.FILE_ATTRIBUTE_STANDARD_TYPE, Gio.FileQueryInfoFlags.NONE,
- GLib.PRIORITY_HIGH_IDLE, None, self._on_query_info_finished)
+ GLib.PRIORITY_LOW, None, self._on_query_info_finished)
def _on_query_info_finished(
self, thumb_file: Gio.File, res: Gio.AsyncResult) -> None:
diff --git a/gnomemusic/views/albumsview.py b/gnomemusic/views/albumsview.py
index dff833e2c..36978a8ef 100644
--- a/gnomemusic/views/albumsview.py
+++ b/gnomemusic/views/albumsview.py
@@ -106,7 +106,7 @@ class AlbumsView(Gtk.Stack):
self._adjustment_timeout_id = GLib.timeout_add(
200, self._retrieve_covers, adjustment.props.value,
- priority=GLib.PRIORITY_LOW)
+ priority=GLib.PRIORITY_DEFAULT - 10)
def _retrieve_covers(self, old_adjustment):
adjustment = self._scrolled_window.props.vadjustment.props.value
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]