import { attachAbort } from "https://deno.land/x/rimbu@1.0.2/channel/custom/utils/utils.ts";
Attaches the given function to the given abort signal if the signal is not undefined or aborted. Returns a cleanup function that will remove the function from the abort signal or undefined in case one of the conditions mentioned earlier prevents the function from being attached.
Parameters
signal: AbortSignal | undefined
- the abort signal to attach the function to