commit daad18c1b5baf921988ab3186328060b9e2be694 parent f727b224e73e5b5ec6cd05b8aacfb8c6355b36d7 Author: Dan Stillman <dstillman@zotero.org> Date: Fri, 15 May 2015 01:46:32 -0400 Include running function in current count in ConcurrentCaller log line Diffstat:
| M | resource/concurrent-caller.js | | | 5 | +++-- |
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/resource/concurrent-caller.js b/resource/concurrent-caller.js @@ -107,10 +107,11 @@ ConcurrentCaller.prototype.fcall = function (func) { return deferred.promise; } - this._log("Running function (" + this._numRunning + " current < " + this._numConcurrent + " max)"); + this._numRunning++; // Otherwise run it now - this._numRunning++; + this._log("Running function (" + this._numRunning + "/" + this._numConcurrent + ")"); + return this._onFunctionDone(Promise.try(func)); }