multi-lock-queue
tl;dr: optimally parallelize tasks that lock on potentially intersecting sets of ids
Use Case
For when you need to:
- lock on a set of ids, and run a task when the locks are acquired
- parallelize as much as possible
- pause/resume
Usage
Basic Promise Queue
const createLockingQueue = const q = const wait = { } const waitAndPrint = qqq// a// b// c
Queue With Locks
const createLockingQueue = const q = q q q // won't run until queue is resume()'dq