by Gajendra Gulgulia
From the article:
Incidentally I found the mechanics of coroutines quite obfuscating given the number of implicit and under-the-hood calls to several methods associated with coroutine and their return type objects. Even with tons of articles and posts on the web, I started to have a feeling that coroutines is an arcane feature that can be understood by the very few who are either in committee or are renowned authors of blogs, books and articles or experienced C++ library authors.
But after a month of arduous efforts and experiments, trials and errors to understand coroutine, I decided to write a tutorial series that can be used by any intermediate C++ developer to understand coroutine and in the effort I made sure that this article is the last that anyone should refer to, to learn, understand and demystify coroutines without being a super experienced C++ library author. If you’re impatient to get started, then directly jump to section 1: What are coroutines? Else read the Introduction section to get detailed highlight of the tutorial series...