Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
josuttis_nm_c20_the_complete_guide.pdf
Скачиваний:
44
Добавлен:
27.03.2023
Размер:
5.85 Mб
Скачать

14.5 Afternotes

503

****resume coro() with back value: OK CORO => OK

CORO 2/3

****coro() suspended with 2

****resume coro() with back value: ERR CORO => ERR

CORO 3/3

****coro() suspended with 3

****resume coro() with back value: OK CORO => OK

CORO 3 end

****coro() done

The coroutine interface has all the flexibility to handle things differently. For example, we could pass a response as a parameter of resume() or share the yielded value and its response in one member.

14.5 Afternotes

The request to support coroutines was first proposed as a pure library extension by Oliver Kowalke and Nat Goodspeed in http://wg21.link/n3708.

Due to the complexity of the feature, a Coroutine TS (experimental technical specification) was established with http://wg21.link/n4403 to work on details.

The wording to finally merge coroutines into the C++20 standard was formulated by Gor Nishanov in http://wg21.link/p0912r5 .

504

This page is intentionally left blank