1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-03 11:33:37 +00:00

(url-queue-run-queue): Pick the first waiting job, and not the last.

This commit is contained in:
Lars Magne Ingebrigtsen 2011-05-02 19:28:34 +02:00
parent 5c77c3eda3
commit 08da93f1a3
2 changed files with 7 additions and 3 deletions

View 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>

View 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))