Ending Fire-and-Forget
Comments
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Summary
Fire-and-forget threads and tasks leave no handle to wait on, cancel, or check for errors, which can cause use-after-free bugs that appear only under load. The article argues for replacing them with structured async scopes, such as C++ counting_scope, that track spawned work and require a join before borrowed data…