Continuations and concurrency

  • Authors:
  • R. Hieb;R. Kent Dybvig

  • Affiliations:
  • Indiana University, Computer Science Department, Lindley Hall 101, Bloomington IN;Indiana University, Computer Science Department, Lindley Hall 101, Bloomington IN

  • Venue:
  • PPOPP '90 Proceedings of the second ACM SIGPLAN symposium on Principles & practice of parallel programming
  • Year:
  • 1990

Quantified Score

Hi-index 0.00

Visualization

Abstract

Continuations have proven to be useful for implementing a variety of control structures, including exception handling facilities and breadth-first searching algorithms. However, traditional continuations are not useful in the presence of concurrency, because the notion of the rest of the computation represented by a continuation does not in general make sense. This paper presents a new type of continuation, called a process continuation, that may be used to control tree-structured concurrency. Just as a traditional continuation represents the rest of a computation from a given point in the computation, a process continuation represents the rest of a subcomputation, or process, from a given point in the subcomputation. Process continuations allow nonlocal exits to arbitrary points in the process tree and allow the capture of a subtree of a computation as a composable continuation for later use. Even in the absence of multiple processes, the precise control achievable with process continuations makes them more useful than traditional continuations.