withGate
function withGate(provider, gate): Provider;Defined in: core/src/gate.ts:126
Let a provider run at most gate.max calls at once.
Put it outside the watchdog. The watchdog arms on its first read, and this reads it only once a slot is held, so a call queued here never spends its deadlines waiting. Inside it, a call that stood in line for five minutes would time out as a silent provider before it ever sent a byte.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
provider |
Provider |
gate |
Gate |