Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

queue.remove() with filter function #1391

Closed
@robsch

Description

@robsch

I'm currently finding a way to remove certain unprocessed entries in a queue/priorityQueue. I don't know how to do it, so I would appreciate if anyone could give me a hint.

Feature suggestion: add another method with which entries gets removed like that:

var q = async.queue(function (task, callback) {    callback();});q.push({some: 'thing'});q.remove(function (task) {    return task.some === 'thing'; // remove task if return value is true});

Or with the priority queue:

var q = async.priorityQueue(function (task, callback) {    callback();}, 3);q.push({some: 'thing'}, 100);q.remove(function (task, priority) {    return task.some === 'thing'; // remove task if return value is true    or    return priority === 100; // remove task with certain priority});

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp