Wraps an asynchronous function to ensure that only one instance of it runs
at a time.
If the wrapped function is called while a previous call is still in progress,
the new call is queued to run immediately after the current one completes.
This is useful for debouncing async operations that should not overlap, such as
network requests or file operations.
When called, the function returns a promise that resolves or rejects with the
result of the next queued call.
This is a specialized form a debounce function, with a zero wait time, and no
arguments.
Wraps an asynchronous function to ensure that only one instance of it runs at a time.
If the wrapped function is called while a previous call is still in progress, the new call is queued to run immediately after the current one completes.
This is useful for debouncing async operations that should not overlap, such as network requests or file operations.
When called, the function returns a promise that resolves or rejects with the result of the next queued call.
This is a specialized form a debounce function, with a zero wait time, and no arguments.