COROUTINES COMUNICATIONS. DESIGN AND IMPLEMENTATION ISSUES IN C++20
DOI:
https://doi.org/10.24193/subbi.2022.2.03Keywords:
asynchronous programming, coroutines, language designAbstract
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.
Received by the editors: 4 December 2022.
2010 Mathematics Subject Classification. 68N19, 68Q85.
1998 CR Categories and Descriptors. D.3.3 [Software]: Programming Languages – Language Constructs and Features; D.1.3 [Software]: Programming Techniques – Language Concurrent Programming.
References
C and c++ reference, coroutines. https://en.cppreference.com/w/cpp/language/coroutines. Accessed: 2022.
A library of c++ coroutine abstractions for the coroutines ts. https://github.com/lewissbaker/cppcoro. Accessed: 2022.
Pep 525 – asynchronous generators. https://peps.python.org/pep-0525. Accessed: 2022.
.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.
.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.
Windows app development documentation. processes and threads. fibers.
https://learn.microsoft.com/en-us/windows/win32/procthread/fibers. Accessed: 2022.
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.
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.
Conway, M. E. Design of a separable transition-diagram compiler. Commun. ACM 6, 7 (jul 1963), 396–408.
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.
Ierusalimschy, R. Programming in Lua, 2003.
Marlin, C. D. Coroutines: A Programming Methodology, a Language Design and an Implementation, vol. 95 of Lecture Notes in Computer Science. Springer, 1980.
Moura, A. L. D., and Ierusalimschy, R. Revisiting coroutines. ACM Trans. Program. Lang. Syst. 31, 2 (feb 2009).
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).
Wang, Z. Web crawler scheduler based on coroutine. 2019 International Conference on Intelligent Computing, Automation and Systems (ICICAS) (2019), 540–543.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2023 Studia Universitatis Babeș-Bolyai Informatica
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.