Coroutines Comunications. Design and Implementation Issues in C++20
Abstract
This paper explores the communication mechanisms and patterns available to coroutines to cooperate with one another. It investigates the issues in designing and implementing a framework for using C++20 coroutines effectively, for generators, asynchronous function calls, and especially asynchronous generators.
References
[2] A library of c++ coroutine abstractions for the coroutines ts. https://github.com/lewissbaker/cppcoro. Accessed: 2022.
[3] Pep 525 – asynchronous generators. https://peps.python.org/pep-0525/ . Accessed: 2022.
[4] .NET/C# guide/language reference. await operator - asynchronously await for a task to completes. https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/await. Accessed: 2022.
[5] .NET/C# guide/language reference. yield statement - provide the next element. https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/statements/yield. Accessed: 2022.
[6] Windows app development documentation. processes and threads. fibers. https://learn.microsoft.com/en-us/windows/win32/procthread/fibers. Accessed: 2022.
[7] Belson, B., Xiang, W., Holdsworth, J. J., and Philippa, B. W. C++20 coroutines on microcontrollers—what we learned. IEEE Embedded Systems Letters 13 (2021), 9–12.
[8] Chauhan, K., Kumar, S., Sethia, D., and Alam, M. N. Performance analysis of kotlin coroutines on android in a model-view-intent architecture pattern. In 2021 2nd International Conference for Emerging Technology (INCET) (2021), IEEE, pp. 1–6.
[9] Conway, M. E. Design of a separable transition-diagram compiler. Commun. ACM 6, 7 (jul 1963), 396–408.
[10] Elizarov, R., Belyaev, M., Akhin, M., and Usmanov, I. Kotlin coroutines: Design and implementation. In Proceedings of the 2021 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software (2021), Association for Computing Machinery, p. 68–84.
[11] Ierusalimschy, R. Programming in Lua, 2003.
[12] Marlin, C. D. Coroutines: A Programming Methodology, a Language Design and an Implementation, vol. 95 of Lecture Notes in Computer Science. Springer, 1980.
[13] Moura, A. L. D., and Ierusalimschy, R. Revisiting coroutines. ACM Trans. Program. Lang. Syst. 31, 2 (feb 2009).
[14] von Merzljak, L., Fent, P., Neumann, T., and Giceva, J. What are you waiting for? use coroutines for asynchronous I/O to hide I/O latencies and maximize the read bandwidth! In International Workshop on Accelerating Data Management Systems (ADMS) (2022).
[15] Wang, Z. Web crawler scheduler based on coroutine. 2019 International Conference on Intelligent Computing, Automation and Systems (ICICAS) (2019), 540–543.

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
Transfer of copyright agreement: When the article is accepted for publication, I, as the author and the representative of the coauthors, hereby agree to transfer to Studia Universitatis Babes-Bolyai, Series Informatica, all rights, including those pertaining to electronic forms and transmissions, under existing copyright laws, except for the following, which the authors specifically retain: the authors can use the material however they want as long as it fits the NC ND terms of the license. The authors have all rights for reuse according to the below license.