abort

abstract fun abort(reason: Any? = null)

Abort

Triggers this controller to use the paired AbortSignal to abort any relying operation. From MDN:

Aborts an asynchronous operation before it has completed. This is able to abort fetch requests, consumption of a response bodies, and streams.

AbortController.abort() on MDN

Parameters

reason

Optional reason parameter to provide