Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
package main
import (
"fmt"
"time"
)
func f() {
messages := make(chan string)
go func() {
<- time.After(500)
messages <- "ping"
}()
<- messages
}
func main() {
for i := 0; i < 500000; i++ {
go f()
}
fmt.Println("Done")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.