What are coroutines in C++20?
问题 What are coroutines in c++20? In what ways it is different from "Parallelism2" or/and "Concurrency2" (look into below image)? The below image is from ISOCPP. https://isocpp.org/files/img/wg21-timeline-2017-03.png 回答1: At an abstract level, Coroutines split the idea of having an execution state off of the idea of having a thread of execution. SIMD (single instruction multiple data) has multiple "threads of execution" but only one execution state (it just works on multiple data). Arguably