lib/queue.js
function dequeue(queue, item) {
    queue[SIZE] -= 1

    let done = false
    item.action(() => {
        if (done) {
            return
        }
        done = true

        if (item.next) {
            dequeue(queue, item.next)
        }
        else {
            assert(queue[TAIL] === item, "BROKEN")
            queue[TAIL] = null
        }
    })
}
function dequeue(queue, item) {
    queue[SIZE] -= 1

    let done = false
    item.action(() => {
        if (done) {
            return
        }
        done = true

        if (item.next) {
            dequeue(queue, item.next)
        }
        else {
            assert(queue[TAIL] === item, "BROKEN")
            queue[TAIL] = null
        }
    })
}
function dequeue ( queue , item ) { queue [ SIZE ] -= 1 let done = false item . action ( ( ) => { if ( done ) { return } done = true if ( item . next ) { dequeue ( queue , item . next ) } else { assert ( queue [ TAIL ] === item , "BROKEN" ) queue [ TAIL ] = null } } ) }
Execute actions in series.

@param {Queue} queue - The queue instance.
@param {object} item - The queued item to be executed.
@returns {void}
Execute actions in series .