]> git.eshelyaron.com Git - emacs.git/commitdiff
(url-queue-run-queue): Pick the first waiting job, and not the last.
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Mon, 2 May 2011 17:28:34 +0000 (19:28 +0200)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Mon, 2 May 2011 17:28:34 +0000 (19:28 +0200)
lisp/url/ChangeLog
lisp/url/url-queue.el

index 0bf4d09c95c161bcf4eb0f098ef16b7cd1ab89b6..55b400e2bd778c401990d41e0bcebbcf190f9d5f 100644 (file)
@@ -1,6 +1,8 @@
 2011-05-02  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * url-queue.el: New file.
+       (url-queue-run-queue): Pick the first waiting job, and not the
+       last.
 
 2011-04-16  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
index 2d94d8afea398be140523ff4b0679895b60d3f5f..d572418e3e29fa90c7ee23f2585ceccd0d97a194 100644 (file)
@@ -67,9 +67,11 @@ controls the level of parallelism via the
   (let ((running 0)
        waiting)
     (dolist (entry url-queue)
-      (if (url-queue-start-time entry)
-         (incf running)
-       (setq waiting entry)))
+      (cond
+       ((url-queue-start-time entry)
+       (incf running))
+       ((not waiting)
+       (setq waiting entry))))
     (when (and waiting
               (< running url-queue-parallel-processes))
       (setf (url-queue-start-time waiting) (float-time))