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

parent 5c77c3ed
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>
......
......@@ -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))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment