Last active
December 18, 2015 18:59
-
-
Save samuell/5829878 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| ) | |
| func main() { | |
| for i := 0; i<1000000; i++ { | |
| c := create_empty_goroutine() | |
| <-c | |
| } | |
| } | |
| func create_empty_goroutine() chan int { | |
| c := make(chan int) | |
| go func() { c <- 1 }() | |
| return c | |
| } |
samuell
commented
Jun 21, 2013
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment