How long a pool request may take, read from the request itself. A request AA may carry timeoutMs, its own HTTP time limit; one without it gets timeouts.HTTP_MS. Everything that waits on the request derives its wait from that one number, so a longer limit cannot be honored by the HTTP call and cut short by the caller that is waiting for it.
- Source
Methods
(static) httpMs(req) → {integer}
The HTTP time limit for req: its timeoutMs when that is a whole number above 0, otherwise timeouts.HTTP_MS.
| Name | Type | Description |
|---|---|---|
req | dynamic |
- Source
- Type:
- integer
(static) isLong(req) → {boolean}
True when req asked for longer than the default HTTP limit. Such a request can hold a pool slot long after its caller has gone, so the coordinator watches its caller and stops it (apiPool.bs, "Stopping a request nobody is waiting for").
| Name | Type | Description |
|---|---|---|
req | dynamic |
- Source
- Type:
- boolean
(static) waitMs(req) → {integer}
How long a caller waits for req's answer: its HTTP limit plus the margin between timeouts.API_WAIT_MS and timeouts.HTTP_MS, so the HTTP call always gives up first and the caller hears its answer rather than giving up on a slot that is still busy.
| Name | Type | Description |
|---|---|---|
req | dynamic |
- Source
- Type:
- integer