✍️ Reframe strict structured concurrency around lifetime correctness#1138
Merged
✍️ 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
2d97874 to
2b6d726
Compare
2b6d726 to
f9828d3
Compare
52b4536 to
d362396
Compare
d362396 to
2c2d7e5
Compare
2c2d7e5 to
e0b5e3c
Compare
9c38fb4 to
9237d26
Compare
9237d26 to
5886d13
Compare
7643c49 to
b267283
Compare
b267283 to
008a7e0
Compare
008a7e0 to
3fc92e9
Compare
3fc92e9 to
376b1b9
Compare
d198610 to
8137d45
Compare
db375af to
3947b58
Compare
3947b58 to
a10f632
Compare
taras
approved these changes
Apr 3, 2026
a10f632 to
0296edc
Compare
0296edc to
e608c1e
Compare
e608c1e to
bee2e07
Compare
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/