Skip to content

Instantly share code, notes, and snippets.

@swannodette
Created August 29, 2013 00:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save swannodette/6373022 to your computer and use it in GitHub Desktop.
Save swannodette/6373022 to your computer and use it in GitHub Desktop.
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