Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

std/async/mod.ts>abortable

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
function abortable
import { abortable } from "https://deno.land/std@0.163.0/async/mod.ts";

Make Promise or AsyncIterable abortable with the given signal.

Parameters

p: Promise<T>
signal: AbortSignal

Returns

Promise<T>

Parameters

p: AsyncIterable<T>
signal: AbortSignal

Returns

AsyncGenerator<T>