Skip to content

josuttis/cppcoro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sequenced Async Coroutine Example

Towards a basic C++20 core example for a sequenced async coroutines.

Why?

This website tries to come up with a basis sequenced async coroutine example we all can use to learn and teach.

Other sources:

I am not alone, a lot of programmers want to to that:

Lewis Baker 2017:

https://lewissbaker.github.io/2017/11/17/understanding-operator-co-await

Lewis Baker 2020:

https://lewissbaker.github.io/2020/05/11/understanding_symmetric_transfer

Frank Birbacher:

https://github.com/birbacher/isocpp-corotask

with a nice tracer for awaiters:

https://github.com/birbacher/isocpp-corotask/blob/main/src/traced.hpp

Björn Fahller:

https://speakerdeck.com/rollbear/o-and-coroutines-for-smooth-data-streaming (video/slides)

Charles Tolman:

https://gitlab.com/charlest_uk/scheduler_demo

based on initial code I presented in my ACCU 2020 C++20 tutorial

Phil Nash and Nico Josuttis (me) came up with a first example in a joined evening session at ACCU 2020:

https://github.com/josuttis/cppcoro/blob/main/async_nico_phil/async4.cpp

Here, we especially tried to understand what's going on by placing several log statements

Micha Eiler came up with an incredible well explained example using all new C++20 features:

https://blog.eiler.eu/posts/20210512/

Others:

https://www.scs.stanford.edu/~dm/blog/c++-coroutines.html

https://www.jeremyong.com/cpp/2021/01/04/cpp20-coroutines-a-minimal-async-framework/

https://mariusbancila.ro/blog/2020/06/22/a-cpp20-coroutine-example/

More

For basic details of how C++20 coroutines (concepts and examples) see

C++20 - The Complete Guide by Nicolai M. Josuttis

http://cppstd20.com

Feedback

I am happy about any constructive feedback. Please use the feedback address of my C++20 book: http://cppstd20.com/feedback

License

The code is licensed under a Creative Commons Attribution 4.0 International License.

http://creativecommons.org/licenses/by/4.0/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published