<commit_before># About
**minions** allows you to concurrently process any tasks you need to (similar to
a worker pool). And it's very simple to use.

# How it works
First things first. To make use of this, you just have to provide a few callbacks,
then instantiate a MinionPool and start() it. A *MinionPool* has
*Minions*, that process *tasks*. Tasks are provided by a *task source*, which
is called to get one task at a time, one for each minion started, and one for
each minion that finishes a previous task.

Both the minions and the task source can keep a *state*, which is useful to keep
database connections for example. 

# Quick Example

## Main code
```js
var minionsMod = require('./src/minions');

try {
  var minionPool = new minionsMod.MinionPool(options);
  minionPool.start();
} catch(error) {
  console.log(util.inspect(error));
}
```

## Configuring the pool
Let's see now what can be defined inside the **options** that we're passing to
the **MinionPool** constructor:
<commit_msg>adding note about npm package<commit_after># About
**minions** allows you to concurrently process any tasks you need to (similar to
a worker pool). And it's very simple to use.

## Installing it
The npm package is called **minionpool**.

# How it works
First things first. To make use of this, you just have to provide a few callbacks,
then instantiate a MinionPool and start() it. A *MinionPool* has
*Minions*, that process *tasks*. Tasks are provided by a *task source*, which
is called to get one task at a time, one for each minion started, and one for
each minion that finishes a previous task.

Both the minions and the task source can keep a *state*, which is useful to keep
database connections for example. 

# Quick Example

## Main code
```js
var minionsMod = require('./src/minions');

try {
  var minionPool = new minionsMod.MinionPool(options);
  minionPool.start();
} catch(error) {
  console.log(util.inspect(error));
}
```

## Configuring the pool
Let's see now what can be defined inside the **options** that we're passing to
the **MinionPool** constructor:

{'fraction_non_alphanumeric': 0.09104046242774566, 'fraction_numerical': 0.0, 'mean_word_length': 4.43717277486911, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '994273', 'n_tokens_mistral': 614, 'n_tokens_neox': 587, 'n_words': 302}