Studia Universitatis Babes-Bolyai: Series Informatica (Dec 2023)

On Composing Asynchronous Operations

  • Radu LUPȘA,
  • Dana LUPȘA

DOI
https://doi.org/10.24193/subbi.2023.2.03
Journal volume & issue
Vol. 68, no. 2

Abstract

Read online

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