Existing Libraries
·2 mins
… continued from the previous post.
Two Popular Choices #
Perhaps the most popular exisiting library is golang.org/x/sync/errgroup by Bryan C. Mills:
|
|
and the older gopkg.in/tomb.v2 by Gustavo Niemeyer:
|
|
Summary #
In practical scenarios, where numerous goroutines are initiated, structured concurrency guarantees their proper management without leaking resources. The managing goroutine must not exit until all its child goroutines complete. Additionally, structured concurrency guarantees thorough error reporting, preventing any errors from being overlooked or disregarded.
… continued in the next post.