Menu

#Abortsignal

3 posts

Feed·
3 of 3 posts
AbortSignal.timeout() and AbortSignal.any(): Cancel Any Async Call in TypeScript
📰
0Read More

AbortSignal.timeout() and AbortSignal.any(): Cancel Any Async Call in TypeScript

DEV Community: typescript·Gabriel Anhaia·2 days ago
#psyIg91h
#devtotypescript#devto#dev#signal#abortsignal

Your setTimeout timeout gives up on the request but never stops it. AbortSignal.timeout(), any() and throwIfAborted() fix that, with no casts.

15s
Kotlin Coroutines to TypeScript: Three Cancellation Patterns That Aren't 1:1
🖼️
0Read More

Kotlin Coroutines to TypeScript: Three Cancellation Patterns That Aren't 1:1

DEV Community·Gabriel Anhaia·6 months ago
#5MC39FBT
#pattern#typescript#kotlin#signal#fetch

Kotlin coroutines cancel structurally; JS Promises don't. AbortController, cancellation tokens, Effect.ts Fiber: when each is enough.

15s