-
Notifications
You must be signed in to change notification settings - Fork 24
What is Structured concurrency
Devrath edited this page Jan 12, 2024
·
12 revisions
Structured concurrency is a way of executing the concurrent code so that proper management of resources and the flow of control is done.
In co-routines, provides some rules for managing the concurrency and execution of concurrent tasks in a controlled and disciplined manner.
In traditional concurrency models such as threads or callback-based systems, It is challenging to manage the lifecycle of concurrent tasks -> Structured concurrency addresses this by a properly structured and hierarchical approach to manage it.
Create a scope and launch the co-routines within the scope so that when the scope is canceled, all the co-routines in it are canceled.
