Jump to content

Structured concurrency

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by JnRouvignac (talk | contribs) at 14:01, 1 August 2019 (Creation). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Structured concurrency is a programming paradigm aimed at improving the clarity, quality, and development time of a computer program by using a structured approach to concurrent programming. The core concept is that when control splits into concurrent tasks that they join up again. If a "main task" splits into several concurrent sub-tasks scheduled to be executed in fibers then those fibers must terminate before the main task can complete.

The naming is inspired by structured programming, which created higher level control-flow statements out of the very basic goto. Similarly, structured concurrency creates higher level mechanisms for concurrency constructs out of the basic concurrent task creation constructs (spawn, threads, fibers).

The concept was formulated in 2016 by Martin Sústrik (creator of ZeroMQ)[1], and then further refined in 2018 by Nathaniel J. Smith, who implemented it in trio.[2]

See also

References

Citations

  1. ^ Sústrik, Martin (7 February 2016). "Structured Concurrency". Retrieved 1 August 2019.
  2. ^ Smith, Nathaniel J. (25 April 2018). "Notes on structured concurrency, or: Go statement considered harmful". Retrieved 1 August 2019.