Skip to content

rturrado/coro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

coro

Some examples using C++20 coroutines.

Most of the code and diagrams in this project have been taken or are based in:

For example, the code in MPP_MCpp folder has been taken from chapters 10 (Introduction to Coroutines) and 11 (Dive Deeper Into Coroutines) of the Multi-Paradigm Programming with Modern C++ book. I've just made some modifications:

  • Changed std::atomic and spin locks for std::stop_source.
  • Changed normal threads for std::jthreads.
  • Used shorter notations for traits (e.g. std::is_copy_constructible_v<T> instead of std::is_copy_constructible<T>::value).
  • Renamed a few things (e.g. continuation_manager instead of executor_resumer).
  • Added more debug output, and lots of comments explaining what code was being called, in which order, and so on.

Likewise, the doc folder contains:

  • cpp_in_action-*.png: sequence diagrams based in the CppInAction project.
  • example_*.png: class diagrams based in the Multi-Paradigm Programming with Modern C++ book.

Releases

No releases published

Packages

No packages published