RSSAmplifier

Lu’s blog · Nov 1, 2023

C++ coroutine and lambda’s lifetime

0
Sign in to vote or save

This page cannot be shown here. You can still read it on the original site — the toolbar below keeps your place in the directory.

We rarely need to worry about lambda’s lifetime more than any other objects in C++ until we are dealing with coroutine at the same time. folly’s wiki has a good example of why we need to be careful about lambda’s lifetime – https://github.com/facebook/folly/blob/main/folly/experimental/coro/README.md#lambdas. The tl;dr is that when you have a lambda that returns a coroutine handle, we need to make…

Read on /cpp-coroutine-and-lambdas-lifetime/

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.