[Pkg-javascript-commits] [node-async] 92/480: replace stupid tasks splice call with shift
Jonas Smedegaard
js at moszumanska.debian.org
Fri May 2 08:58:15 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 f3aec6187f9148a5855a365ee2fcd94430bf4706
Author: Caolan McMahon <caolan at caolanmcmahon.com>
Date: Thu Jul 7 09:20:23 2011 -0700
replace stupid tasks splice call with shift
---
dist/async.min.js | 2 +-
lib/async.js | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dist/async.min.js b/dist/async.min.js
index 0332e4b..bf3c3aa 100644
--- a/dist/async.min.js
+++ b/dist/async.min.js
@@ -1 +1 @@
-/*global setTimeout: false, console: false */(function(){var a={};var b=this,c=b.async;typeof module!=="undefined"&&module.exports?module.exports=a:b.async=a,a.noConflict=function(){b.async=c;return a};var d=function(a,b){if(a.forEach)return a.forEach(b);for(var c=0;c<a.length;c+=1)b(a[c],c,a)};var e=function(a,b){if(a.map)return a.map(b);var c=[];d(a,function(a,d,e){c.push(b(a,d,e))});return c};var f=function(a,b,c){if(a.reduce)return a.reduce(b,c);d(a,function(a,d,e){c=b(c,a,d,e)});ret [...]
\ No newline at end of file
+/*global setTimeout: false, console: false */(function(){var a={},b=this,c=b.async;typeof module!="undefined"&&module.exports?module.exports=a:b.async=a,a.noConflict=function(){b.async=c;return a};var d=function(a,b){if(a.forEach)return a.forEach(b);for(var c=0;c<a.length;c+=1)b(a[c],c,a)},e=function(a,b){if(a.map)return a.map(b);var c=[];d(a,function(a,d,e){c.push(b(a,d,e))});return c},f=function(a,b,c){if(a.reduce)return a.reduce(b,c);d(a,function(a,d,e){c=b(c,a,d,e)});return c},g=func [...]
\ No newline at end of file
diff --git a/lib/async.js b/lib/async.js
index 67de211..73eddc8 100644
--- a/lib/async.js
+++ b/lib/async.js
@@ -560,7 +560,7 @@
},
process: function () {
if (workers < q.concurrency && tasks.length) {
- var task = tasks.splice(0, 1)[0];
+ var task = tasks.shift();
if(q.empty && tasks.length == 0) q.empty();
workers += 1;
worker(task.data, function () {
--
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