TypeScript Structured Concurrency
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
- Reading 15: Promisesweb.mit.edu
- Notes on structured concurrency, or: Go statement considered harmful - njs blogvorpus.org
- Zig explores structured concurrency [LWN.net]lwn.net
- Reading 16: Mutual Exclusionweb.mit.edu
- Let futures be futureswithout.boats
- What Async Promised and What it Delivered — Causalitycausality.blog
- Concurrency Patterns in Embedded Rust - Ferrous Systemsferrous-systems.com
- The Scoped Task trilemmawithout.boats
- Fearless Concurrency - The Rust Programming Languagedoc.rust-lang.org
- Microtasks and event looptr.javascript.info
- TypeScript: Documentation - TypeScript 3.7typescriptlang.org
- Async Rust Is A Bad Languagebitbashing.io