Abstract
Asynchronous operations are very useful for actions that wait for an external event or work for a long time, to avoid blocking the thread that launches them. Unfortunately, whether they report their termination via callbacks or via completing a future, composing several asynchronous calls is difficult and error prone. The continuations mechanism (provided, for example, in C# Task Parallel Library via ContinueWith()) offers limited support for scheduling a sequence of operations. In this paper we try to improve this mechanism with better support for sequencing operations and exceptions, and with support for conditionals and loops, while covering the specifics of a C++ implementation. The most recent version of our source code is at [14].
Keywords and phrases: asynchronous programming.
Publisher
Babes-Bolyai University Cluj-Napoca
Reference15 articles.
1. "1. C++ reference. extensions for concurrency. https://en.cppreference.com/w/cpp/experimental/future/then. Accessed: 2023. [2] Java Platform, Standard Edition 8 API Specification, CompletableFuture.
2. 2. https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html. Accessed: 2023.
3. 3. David Pine, e. a. Task parallel library (tpl). https://learn.microsoft.com/en-us/dotnet/standard/parallel-programming/ task-parallel-library-tpl, 2022. Accessed: 2022.
4. 4. Duan, J., Yi, X., Wang, J., Wu, C., and Le, F. Netstar: A future/promise frame- work for asynchronous network functions. IEEE Journal on Selected Areas in Communications 37, 3 (2019), 600-612.
5. 5. Elizarov, R., Belyaev, M., Akhin, M., and Usmanov, I. Kotlin coroutines: Design and implementation. Onward! 2021, Association for Computing Machinery, p. 68-84.