✍️ Reframe strict structured concurrency around lifetime correctness#1138
Open
✍️ Reframe strict structured concurrency around lifetime correctness#1138
Conversation
commit: |
e1e4c0c to
38de956
Compare
38de956 to
206d386
Compare
206d386 to
05bd9ef
Compare
d139195 to
05bd9ef
Compare
Replace the static foreground/background split diagram with an animated timeline showing bars growing over time, the scope boundary appearing when foreground completes, and background overshoot being reclaimed. Uses FOREGROUND/BACKGROUND section headings, single-line title at 52px. Supports CSS animations with prefers-reduced-motion fallback to static end-state. Light/dark mode via prefers-color-scheme media query. Session-ID: ses_306f2b523ffeWNTN1w2kiCQ3Lj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The strict structured concurrency post already introduced foreground and background work, but it still read primarily as a convenience refinement. This update makes the stronger claim explicit: when incidental background work can keep a scope alive after the meaningful computation is complete, the lifetime model is semantically wrong and every framework built on top of it inherits an incorrectness tax.
Approach
Rewrite the article to lead with the correctness argument, introduce foreground vs background earlier, and recast the spinner/timeout example as a semantic and operational failure mode rather than cleanup boilerplate. Preserve the existing points about aggressive teardown, classic structured concurrency, and orderly cleanup while tightening the argument around lifetime correctness, hung scopes, and the operational cost of letting support work outlive the computation it was supposed to support.
Preview
https://effection--strict-structured-concurre.deno.dev/blog/2026-03-12-strict-structured-concurrency/