Skip to content

Add lambda coroutine captures documentation page#213

Merged
sgerbino merged 1 commit intocppalliance:developfrom
sgerbino:pr/lambda-footgun
Mar 5, 2026
Merged

Add lambda coroutine captures documentation page#213
sgerbino merged 1 commit intocppalliance:developfrom
sgerbino:pr/lambda-footgun

Conversation

@sgerbino
Copy link
Collaborator

@sgerbino sgerbino commented Mar 5, 2026

Lambda captures live in the closure object, not the coroutine frame, causing dangling references when the lambda temporary is destroyed. Document the IIFE parameter pattern and named function alternatives.

Resolves #119.

Lambda captures live in the closure object, not the coroutine frame,
causing dangling references when the lambda temporary is destroyed.
Document the IIFE parameter pattern and named function alternatives.
@coderabbitai
Copy link

coderabbitai bot commented Mar 5, 2026

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (3)
  • doc/modules/ROOT/nav.adoc is excluded by !**/doc/**
  • doc/modules/ROOT/pages/4.coroutines/4g.allocators.adoc is excluded by !**/doc/**
  • doc/modules/ROOT/pages/4.coroutines/4h.lambda-captures.adoc is excluded by !**/doc/**

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7125bcc4-0026-4a6e-bea9-5d1673b08ef5

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cppalliance-bot
Copy link

An automated preview of the documentation is available at https://213.capy.prtest3.cppalliance.org/index.html

If more commits are pushed to the pull request, the docs will rebuild at the same URL.

2026-03-05 16:16:44 UTC

@codecov
Copy link

codecov bot commented Mar 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.89%. Comparing base (935dd21) to head (382a278).
⚠️ Report is 9 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #213      +/-   ##
===========================================
+ Coverage    91.77%   91.89%   +0.11%     
===========================================
  Files           76       76              
  Lines         4500     4504       +4     
===========================================
+ Hits          4130     4139       +9     
+ Misses         370      365       -5     

see 9 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 935dd21...382a278. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cppalliance-bot
Copy link

GCOVR code coverage report https://213.capy.prtest3.cppalliance.org/gcovr/index.html
LCOV code coverage report https://213.capy.prtest3.cppalliance.org/genhtml/index.html
Coverage Diff Report https://213.capy.prtest3.cppalliance.org/diff-report/index.html

Build time: 2026-03-05 16:31:50 UTC

@sgerbino sgerbino merged commit 9fe88b0 into cppalliance:develop Mar 5, 2026
36 checks passed
@sgerbino sgerbino deleted the pr/lambda-footgun branch March 5, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

lambda coroutine captures are a foot-gun

2 participants