-
-
Save suzuken/83a534adfcf4cc5b1a3c to your computer and use it in GitHub Desktop.
This file contains 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
// original http://dave.cheney.net/2014/03/19/channel-axioms | |
package main | |
func main() { | |
var c chan string | |
c <- "deadlock" | |
// -> % go run /tmp/c.go | |
// fatal error: all goroutines are asleep - deadlock! | |
// | |
// goroutine 1 [chan send (nil chan)]: | |
// main.main() | |
// /tmp/c.go:5 +0x49 | |
// exit status 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment