[Pkg-javascript-commits] [node-async] 270/480: README updated for unshift
Jonas Smedegaard
js at moszumanska.debian.org
Fri May 2 08:58:33 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository node-async.
commit 570905eebedaa70e557ec58a2974eb96513c38a3
Author: KARASZI István <github at spam.raszi.hu>
Date: Mon Feb 4 19:11:48 2013 +0100
README updated for unshift
---
README.md | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/README.md b/README.md
index 4b22464..041aef6 100644
--- a/README.md
+++ b/README.md
@@ -806,6 +806,7 @@ methods:
* push(task, [callback]) - add a new task to the queue, the callback is called
once the worker has finished processing the task.
instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list.
+* unshift(task, [callback]) - add a new task to the front of the queue.
* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued
* empty - a callback that is called when the last item from the queue is given to a worker
* drain - a callback that is called when the last item from the queue has returned from the worker
@@ -840,6 +841,12 @@ q.push({name: 'bar'}, function (err) {
q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) {
console.log('finished processing bar');
});
+
+// add some items to the front of the queue
+
+q.unshift({name: 'bar'}, function (err) {
+ console.log('finished processing bar');
+});
```
---------------------------------------
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-async.git
More information about the Pkg-javascript-commits
mailing list