Wraps a function to make it abortable. The wrapped function will listen to the
provided abort signal and call the onAbort callback if the signal is aborted.
If the signal is already aborted, the wrapped function will throw before
calling the original function.
Note: This function should not be used to wrap functions that return promises.
Use abortableAsync instead.
Wraps a function to make it abortable. The wrapped function will listen to the provided abort signal and call the onAbort callback if the signal is aborted.
If the signal is already aborted, the wrapped function will throw before calling the original function.
Note: This function should not be used to wrap functions that return promises. Use
abortableAsync
instead.