The Situation
I have an asynchronous function that takes ~X seconds
to resolve. The duration depends on network latency so it is unpredictable. The function is triggered by user input (think "save current form values to the server")
I would like to prevent this function from running multiple times simultaneously.
I would also like to "queue" calls to the function for potentially calling when the time is right.
The Question
(A) Is there a term for this concept of a "patient" async function.
(B) Is there a tool (similar to debounce) that will take an async function and turn it into a "patient" one.