Programming, Software Development, JavaScript, Python, Web Development.
fmt.Println("Done") done <- true } func main() { done := make(chan bool, 1) go worker(done) <-done } Discussion: Goroutines are lightweight when compared to threads and are managed by the Go runtime. The language also provides channels for safely communicating between goroutines. On the