Skip to content

Commit

Permalink
fix docs (thanks @felipou) and widen travis tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sandfox committed Jan 7, 2016
1 parent 991069a commit 8d99ea0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
4 changes: 0 additions & 4 deletions .travis.yml
Expand Up @@ -11,7 +11,3 @@ sudo: false

matrix:
fast_finish: true
allow_failures:
- node_js: "0.12"
- node_js: "4"
- node_js: "5"
9 changes: 7 additions & 2 deletions README.md
Expand Up @@ -11,6 +11,9 @@

## History

2.3.1 - January 7 2016
- Documentation fixes and widened number of nodejs versions tested on travis

2.3.0 - January 1 2016
- Merged #105 - allow asynchronous validate functions (contributed by @felipou)

Expand Down Expand Up @@ -210,8 +213,10 @@ If you do this, your node process will exit gracefully.
is OK to use, or false if the object is invalid. Invalid objects will be destroyed.
This function is called in acquire() before returning a resource from the pool.
Optional. Default function always returns true.
validateAsync : true/false - Indicates whether the validate function is
asynchronous. Default is false.
validateAsync : Asynchronous validate function. Receives a callback function as its second argument,
which should be called with a single boolean argument being true if the item is still
valid and false if it should be removed from the pool. Called before item is acquired
from pool. Default is undefined. Only one of validate/validateAsync may be specified
log : true/false or function -
If a log is a function, it will be called with two parameters:
- log string
Expand Down
2 changes: 1 addition & 1 deletion lib/generic-pool.js
Expand Up @@ -92,7 +92,7 @@ function doWhileAsync( conditionFn, iterateFn, callbackFn ) {
* as its second argument, that should be called with a single
* boolean argument being true if the item is still valid and false
* if it should be removed from pool. Called before item is
* acquired from pool.
* acquired from pool. Only one of validate/validateAsync may be specified
* @param {Number} factory.max
* Maximum number of items that can exist at the same time. Default: 1.
* Any further acquire requests will be pushed to the waiting list.
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"name": "generic-pool",
"description": "Generic resource pooling for Node.JS",
"version": "2.3.0",
"version": "2.3.1",
"author": "James Cooper <james@bitmechanic.com>",
"contributors": [
{ "name": "James Cooper", "email": "james@bitmechanic.com" },
Expand Down

0 comments on commit 8d99ea0

Please sign in to comment.