diff options
author | Lars Magne Ingebrigtsen <larsi@gnus.org> | 2011-05-02 19:28:34 +0200 |
---|---|---|
committer | Lars Magne Ingebrigtsen <larsi@gnus.org> | 2011-05-02 19:28:34 +0200 |
commit | 08da93f1a3b99ea81572aeb2e8d0fdfa7b63b0e8 (patch) | |
tree | 20911441a312a7ef149028cc1a6399458918af16 /lisp/url | |
parent | 5c77c3eda3fad59d6aa5c716f49b24e911e1c222 (diff) | |
download | emacs-08da93f1a3b99ea81572aeb2e8d0fdfa7b63b0e8.tar.gz |
(url-queue-run-queue): Pick the first waiting job, and not the last.
Diffstat (limited to 'lisp/url')
-rw-r--r-- | lisp/url/ChangeLog | 2 | ||||
-rw-r--r-- | lisp/url/url-queue.el | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 0bf4d09c95c..55b400e2bd7 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -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> diff --git a/lisp/url/url-queue.el b/lisp/url/url-queue.el index 2d94d8afea3..d572418e3e2 100644 --- a/lisp/url/url-queue.el +++ b/lisp/url/url-queue.el @@ -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)) |