Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

a small primitive to track async operations

Notifications You must be signed in to change notification settings

homebound-team/rtl-async-queue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

42284db · Feb 10, 2022

History

7 Commits
Feb 10, 2022
Feb 10, 2022
Feb 10, 2022
Feb 10, 2022
Feb 10, 2022
Feb 10, 2022
Feb 10, 2022
Feb 10, 2022
Feb 10, 2022
Feb 10, 2022
Feb 10, 2022
Feb 10, 2022
Feb 10, 2022
Feb 10, 2022
Feb 10, 2022

Repository files navigation

Archiving b/c we discovered jest.getTimerCount() which is good enough for now.


Provides a minimalistic queue for in-flight operations.

This allows tests to change their behavior from "wait until bespoke condition Y is true" to "wait until outstanding operations are done".

This is a standalone package with no dependencies so that it can be called from production code.

In theory this could be useful for driving a mini-dashboard/spinner of "operations in-flight" or "failed async operations", but really the core reason is to provide a dependency that doesn't need to be mocked out.