Structured concurrency: Difference between revisions

Content deleted Content added
Lucenty (talk | contribs)
external link to structured concurrency forum
Lucenty (talk | contribs)
m define without "scheduling fibers"
Line 1:
{{Programming paradigms}}
 
'''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 computing|concurrent programming]]. The core concept is that when control splits into concurrent tasks that they join up again, and that this control flow is readily evident by the structure of the source code. If a "main task" splits into several concurrent sub-tasks scheduled to be executed in fibers then those fiberssub-tasks must terminate before the main task can complete. To be effective, this model must be applied consistently throughout the program-- otherwise concurrent tasks may leak out, become orphaned, or fail to have runtime errors correctly propagated.
 
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 (computing)|spawn]], [[Thread (computing)|thread]]s, [[Fiber (computer science)|fiber]]s).