You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, fallible functions are executed in a new goroutine when (*errgroup.Group).Go is called. This creates some overhead when running a large number of fallible functions as we have to pay the price of creating a new goroutine each time.
Instead, we could abstract away the procurement of goroutines as we only care that our fallible function is executed in another goroutine - it does not necessarily need to be a new one. This way, we could allow the consumer to choose whether they would like to execute a fallible function in a new goroutine or have it executed by a single goroutine from a pool of existing goroutines.
The text was updated successfully, but these errors were encountered:
Currently, fallible functions are executed in a new goroutine when
(*errgroup.Group).Go
is called. This creates some overhead when running a large number of fallible functions as we have to pay the price of creating a new goroutine each time.Instead, we could abstract away the procurement of goroutines as we only care that our fallible function is executed in another goroutine - it does not necessarily need to be a new one. This way, we could allow the consumer to choose whether they would like to execute a fallible function in a new goroutine or have it executed by a single goroutine from a pool of existing goroutines.
The text was updated successfully, but these errors were encountered: