go

go

Waiting Goroutines: fetching stock prices

Goroutines are a lightweight approach for concurrent processing. This means you can trigger different long running tasks and let Go and your hardware find how to use the available resources. However, your program will not wait automatically for those tasks to finish. The execution can simply stop, and your routines will die along it. This article shows how you can wait for all goroutines to finish on a common use case: fetching data from a external API, such as stock prices.

Read