taskgroup
Advanced tools
Comparing version 3.1.0 to 3.1.1
@@ -75,7 +75,6 @@ // Generated by CoffeeScript 1.6.2 | ||
process.nextTick(function() { | ||
var args, fn; | ||
var args; | ||
fn = _this.fn.bind(_this); | ||
args = (_this.args || []).concat([complete]); | ||
return ambi.apply(null, [fn].concat(__slice.call(args))); | ||
return ambi.apply(null, [_this.fn.bind(_this)].concat(__slice.call(args))); | ||
}); | ||
@@ -121,2 +120,3 @@ return this; | ||
this.pause = __bind(this.pause, this); | ||
this.exit = __bind(this.exit, this); | ||
this.stop = __bind(this.stop, this); | ||
@@ -154,3 +154,3 @@ this.clear = __bind(this.clear, this); | ||
args = [_this.addGroup, _this.addTask]; | ||
_this.addTask(fn.bind(_this)).setConfig({ | ||
_this.addTask(_this.fn.bind(_this)).setConfig({ | ||
args: args, | ||
@@ -174,3 +174,5 @@ includeInResults: false | ||
} | ||
--_this.running; | ||
if (_this.running > 0) { | ||
--_this.running; | ||
} | ||
if (_this.paused) { | ||
@@ -346,2 +348,12 @@ return; | ||
TaskGroup.prototype.exit = function(err) { | ||
if (err) { | ||
this.err = err; | ||
} | ||
this.stop(); | ||
this.running = 0; | ||
this.complete(); | ||
return this; | ||
}; | ||
TaskGroup.prototype.pause = function() { | ||
@@ -348,0 +360,0 @@ this.paused = true; |
{ | ||
"name": "taskgroup", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"description": "Group together synchronous and asynchronous tasks and execute them with support for concurrency, naming, and nesting.", | ||
@@ -38,3 +38,4 @@ "homepage": "https://github.com/bevry/taskgroup", | ||
"coffee-script": "~1.6.2", | ||
"joe": "~1.1.2", | ||
"joe": "~1.2.0", | ||
"joe-reporter-console": "~1.2.1", | ||
"chai": "~1.5.0" | ||
@@ -41,0 +42,0 @@ }, |
@@ -103,4 +103,5 @@ # Task Group | ||
- `clear()` - remove the remaining items to be executed | ||
- `pause()` - pause the execution of the items | ||
- `stop()` - clear and pause | ||
- `pause()` - pause the execution of the items | ||
- `exit(err)` - stop and complete, `err` if specified is sent to the completion event when fired | ||
- `run()` - start/resume executing the items, returns chain | ||
@@ -107,0 +108,0 @@ - All those of [EventEmitter2](https://github.com/hij1nx/EventEmitter2) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19026
366
154
4