MCPcopy Create free account
hub / github.com/coopernurse/node-pool / _dispatchResource

Method _dispatchResource

lib/Pool.js:200–208  ·  view source on GitHub ↗

* Attempt to move an available resource to a waiting client * @return {Boolean} [description]

()

Source from the content-addressed store, hash-verified

198 * @return {Boolean} [description]
199 */
200 _dispatchResource() {
201 if (this._availableObjects.length < 1) {
202 return false;
203 }
204
205 const pooledResource = this._availableObjects.shift();
206 this._dispatchPooledResourceToNextWaitingClient(pooledResource);
207 return false;
208 }
209
210 /**
211 * Attempt to resolve an outstanding resource request using an available resource from

Callers 1

_dispenseMethod · 0.95

Calls 2

shiftMethod · 0.80

Tested by

no test coverage detected