flâneur — a map of the web's best reading

TypeScript Structured Concurrency

thecandidstartup.org · 2,065 words · saved by 3 readers

Over time I’ve come to realize that there’s more to error-handling in concurrent programs than rejected promises or async Results. The code I’m writing is all a bit ad-hoc. Especially when it comes to async execution lifetimes.

Over time I’ve come to realize that there’s more to error-handling in concurrent programs than rejected promises or async Results . The code I’m writing is all a bit ad-hoc. Especially when it comes to async execution lifetimes. As I’m using TypeScript, I start a concurrent operation by calling an async function which returns a promise. Sometimes I need the result immediately and await promise completion before proceeding. No issues here, but no real concurrency either. At the other end of the spectrum, the function is a fire-and-forget operation and I leave the promise dangling. I don’t care

Explore this link on the map →

saved by

related reading