Asynchronous effects

4 Mar 2020  ·  Danel Ahman, Matija Pretnar ·

We investigate asynchronous programming in the context of algebraic effects. In contrast to their conventional synchronous treatment, we show that one can naturally also accommodate asynchrony within algebraic effects, by decoupling the execution of operation calls into signalling that the operation's implementation needs to be executed and interrupting the computation with the operation's result, to which the computation can react through a previously installed interrupt handler. We formalise these ideas in a small calculus, called $\lambda_{\text{\ae}}$. We demonstrate the flexibility of $\lambda_{\text{\ae}}$ using examples ranging from a simple three-party web application, to preemptive multi-threading, to remote function calls, to a parallel variant of runners of algebraic effects.

PDF Abstract

Datasets


  Add Datasets introduced or used in this paper