[gnome-music/wip/mschraal/prioritypool-v3: 4/5] asyncqueue: Make debug timing more precise




commit 86e13dad44dda71ef9452e081e728c56e8c67fc7
Author: Marinus Schraal <mschraal gnome org>
Date:   Tue Feb 1 20:50:10 2022 +0100

    asyncqueue: Make debug timing more precise

 gnomemusic/asyncqueue.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/gnomemusic/asyncqueue.py b/gnomemusic/asyncqueue.py
index 017ee7c7e..a3491de92 100644
--- a/gnomemusic/asyncqueue.py
+++ b/gnomemusic/asyncqueue.py
@@ -84,7 +84,6 @@ class AsyncQueue(GObject.GObject):
             self._timeout_id = GLib.timeout_add(100, self._dispatch)
 
     def _dispatch(self) -> bool:
-        tick = time.time()
         common_ids = self._common_ids()
 
         while len(self._async_active_pool) < self._max_async:
@@ -111,7 +110,7 @@ class AsyncQueue(GObject.GObject):
 
             self._async_data[async_obj] = (
                 async_obj.connect("finished", self._on_async_finished),
-                tick)
+                time.time())
             async_obj.start(*async_task_args[1:])
 
         return GLib.SOURCE_CONTINUE


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]