You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

The core concept of structured concurrency 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 main benefit of structured concurrency is abstraction.  A caller of a method that is invoked to do a task should not care if the method decomposes the task and schedules a million fibers. When the method completes, any fibers scheduled by the method should have terminated.

More information:

Nathaniel J. Smith: Notes on structured concurrency, or: Go statement considered harmful

Martin Sustrik: Structured Concurrency

Current prototype

Cancellation

Deadline/Timeouts

Termination queues

Issues/Discussion points

  • No labels