diff --git a/README.md b/README.md index 9b5bcd7..a432eaf 100644 --- a/README.md +++ b/README.md @@ -88,16 +88,16 @@ Initialisise the pool, only yielding after the minimum number of resources have ```js const resource = await pool.acquire(); ``` -Acquires and validates a resource from the pool, creating one if necessary as long as the optional maximum pool size has not been reached. If the pool is exhausted this method will block until a resource becomes available or the acquireTimeout is exceeded. If the acquireTimeout is exceed the method will reject. Resources created after the timeout is exceeded will be added to the pool. +Acquires and validates a resource from the pool, creating one if necessary as long as the optional maximum pool size has not been reached. If the create or validate fails acquition will be retried after the `acquireRetryInterval`. If the pool is exhausted this method will block until a resource becomes available or the `acquireTimeout` is exceeded. If the `acquireTimeout` is exceed the method will reject. Resources created after the timeout is exceeded will be added to the pool. There are equally strong arguments to re-issue the most recently used reosurce as as the least recently used. X-Pool deliberately offers no guarantees of the order in which idle resources are re-issued, and instead provides the option of keeping the resources warm by revalidating idle resources reguarly via the `revalidateInterval` configuration option. #### Errors -| Code | Notes | -| ----------------------------------- | -------------------------------- | -| ERR_X‑POOL_OPERATION_TIMEDOUT | The acquire timeout was exceeded | -| ERR_X‑POOL_SHUTDOWN_FAILED | The pool has been shutdown | +| Code | Notes | +| ----------------------------------- | --------------------------------------------------------------------------- | +| ERR_X‑POOL_OPERATION_TIMEDOUT | The acquire timeout was exceeded | +| ERR_X‑POOL_OPERATION_FAILED | The resource could not be acquired (e.g. because the pool is shutting down) | ### release(resource: T) : void ```js