bug-wget
[Top][All Lists]
Advanced

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

Re: [Bug-wget] Add LIFO queue option for recursive download


From: John Peterson
Subject: Re: [Bug-wget] Add LIFO queue option for recursive download
Date: Mon, 5 Jan 2015 19:06:37 +0100

### enqueue html last isnt enough

>This is not what I said. I said: enqueue html last + enqueue non-html first

> This basically the same as having two queues: one for HTML and one for 
> non-HTML. non-HTML working as LIFO, always picked before HTML. If empty, pick 
> from HTML queue (FIFO).

show it with code because i dont understand

the current FIFO code is:

    while (1)
        // FIFO
        url_dequeue

        if (descend)
            for (; child; child = child->next)
                url_enqueue
                
the LIFO solution is:

    while (1)
        // LIFO
        url_dequeue

        if (descend)
            // place html pages on top
            ll_bubblesort(&child);
            for (; child; child = child->next)
                url_enqueue

reply via email to

[Prev in Thread] Current Thread [Next in Thread]