Skip to content

Latest commit

 

History

History
12 lines (8 loc) · 424 Bytes

throttle.md

File metadata and controls

12 lines (8 loc) · 424 Bytes

nbd/util/throttle

Throttles calls based on an asynchronous promise return.

(promiseGenerator)

promiseGenerator is assumed to be a function that is called by throttle, and if the return value is a thenable, further calls to throttle of promiseGenerator are throttled until the thenable settles.

returns retval Return value from calling promiseGenerator or undefined due to being throttled.