FUZD / @fuzd/common / processInGroups
Function: processInGroups()
processInGroups<
T>(items,keyOf,concurrency,task):Promise<void>
Run task over items, concurrency groups at a time. Items sharing a key form a group and run one after the other in the order given, so per-key ordering (an account's nonces) is kept while different keys proceed in parallel. task must not throw: callers handle their own failures.
Type Parameters
• T
Parameters
items
readonly T[]
keyOf
(item) => string
concurrency
number
task
(item) => Promise<void>
Returns
Promise<void>
Defined in
processing.ts:51