Skip to content

Commit

Permalink
Clean up README
Browse files Browse the repository at this point in the history
  • Loading branch information
aberman committed Aug 14, 2011
1 parent 41c94ab commit da37720
Showing 1 changed file with 11 additions and 20 deletions.
31 changes: 11 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,16 @@
### Global pool tuning parameters
All parameters are optional and the default will be used.

* acquire_increment - Default: 3 - Determines the number of members to acquire at a time when the
pool requires more processes to fill the pool
* acquire_increment - Default: 3 - Determines the number of members to acquire at a time when the pool requires more processes to fill the pool
* initial_pool_size - Default: 5 - Determines the number of members to acquire at startup
* max_pool_size - Default: infinity - Determines the maximum number of members the pool will hold.
Any requests above this will yield an error.
* min_pool_size - Default: 3 - Determines the minimum number of members the pool will hold.
The pool will always have this many members in it at any time.
* idle_timeout - Default: 7200000 (2 hours, Specified in milliseconds or infinity atom) - Determines the maximum amount
of time a member will remain idle. If a member exceeds the time, it does not necessarily determine
that it will be killed. The pool will automatically decide whether it wants to kill the idle process
depending on the max and min pool size.
* max_age - Default: infinity (Specified in milliseconds or infinity atom) - Determines the maximum amount of time
a member will exist. Sometimes you want the pool to expire stale processes, so you would set this configuration parameter
according to how frequently to kill processes that your application considers stale. If the process is checked out and it
is stale, it will be killed upon check in.
* max_pool_size - Default: infinity - Determines the maximum number of members the pool will hold. Any requests above this will yield an error.
* min_pool_size - Default: 3 - Determines the minimum number of members the pool will hold. The pool will always have this many members in it at any time.
* idle_timeout - Default: 7200000 (2 hours, Specified in milliseconds or infinity atom) - Determines the maximum amount of time a member will remain idle. If a member exceeds the time, it does not necessarily determine that it will be killed. The pool will automatically decide whether it wants to kill the idle process depending on the max and min pool size.
* max_age - Default: infinity (Specified in milliseconds or infinity atom) - Determines the maximum amount of time a member will exist. Sometimes you want the pool to expire stale processes, so you would set this configuration parameter
according to how frequently to kill processes that your application considers stale. If the process is checked out and it is stale, it will be killed upon check in.

### Pool Worker Setup
Any of the above global tuning parameters can be overridden for a specific pool. The pool will only call start_link
on the module specific in the parameters
Any of the above global tuning parameters can be overridden for a specific pool. The pool will only call start_link on the module specific in the parameters

* module - The name of the worker module
* args - Any args that the worker module should be passed
Expand All @@ -54,16 +45,16 @@ Until I document the code, please refer here on how to use Pooly.

* pooly:check_out(PoolName) -> {ok, Pid}
-> {error, pool_exhausted} - The pool has reached maximum capacity as determined by the max_pool_size
** Checks out a process from the pool.
Checks out a process from the pool.

* pooly:check_in(PoolName, Pid) -> ok
** Checks in a process from the pool.
Checks in a process from the pool.

* pooly:size(PoolName) -> {ok, integer()}
** Returns the number of available workers (size of queue)
Returns the number of available workers (size of queue)

* pooly:total(PoolName) -> {ok, integer()}
** Returns the total number of workers the pool is managing (available and busy workers)
Returns the total number of workers the pool is managing (available and busy workers)

## License & Copyright

Expand Down

0 comments on commit da37720

Please sign in to comment.