* Remove a promise from the queue. * * @param task Can be any PromiseLike * @returns Removed promise.
(task: PromiseLike<T>)
| 29 | * @returns Removed promise. |
| 30 | */ |
| 31 | function remove(task: PromiseLike<T>): void { |
| 32 | buffer.delete(task); |
| 33 | } |
| 34 | |
| 35 | /** |
| 36 | * Add a promise (representing an in-flight action) to the queue, and set it to remove itself on fulfillment. |