Skip to content

Commit ef076ac

Browse files
committed
Set the minimum automatic limit to 2
Fixes #24 Fixes #23
1 parent dc99a4f commit ef076ac

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ grunt.registerTask('default', ['concurrent:target1', 'concurrent:target2']);
5858
### limit
5959

6060
Type: `Number`
61-
Default: Number of CPU cores (`require('os').cpus().length`)
61+
Default: Number of CPU cores (`require('os').cpus().length`) with a minimum of 2
6262

6363
Limit of how many tasks that are run concurrently.
6464

tasks/concurrent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module.exports = function (grunt) {
77
var spawnOptions;
88
var cb = this.async();
99
var options = this.options({
10-
limit: require('os').cpus().length
10+
limit: Math.max(require('os').cpus().length, 2)
1111
});
1212
// Set the tasks based on the config format
1313
var tasks = this.data.tasks || this.data;

0 commit comments

Comments
 (0)