C++ coroutines: Snooping in on the coroutine body--Raymond Chen

Save to:
Instapaper Pocket Readability

The series continue.

C++ coroutines: Snooping in on the coroutine body

by Raymond Chen

From the article:

A coroutine promise can snoop on the coroutine body by implementing a method named await_transform. Any time the coroutine body performs a co_await, the thing being awaited is passed through the await_transform method, and whatever await_transform returns is the thing that is actually awaited. This is the mysterious “We’re not ready to talk about step 1 yet” that kept reappearing in our introduction to awaitable objects...

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.