Home > @vsf-enterprise/sapcc-api > ConcurrentCallbacksReducer
ConcurrentCallbacksReducer class
This helper can accept multiple concurrent callbacks. Only the first one will be executed. The remaining ones will wait for the first one to finish and return its result. It allows us not to do the same thing more than once (e.g. in case of multiple concurrent requests such as refreshing access tokens).
Signature:
export declare class ConcurrentCallbacksReducer<T>
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)() | Constructs a new instance of the ConcurrentCallbacksReducer class |
Methods
Method | Modifiers | Description |
---|---|---|
reduce(callback) |