Skip to content

Instantly share code, notes, and snippets.

@suzuken
Created March 23, 2016 02:23
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 suzuken/83a534adfcf4cc5b1a3c to your computer and use it in GitHub Desktop.
Save suzuken/83a534adfcf4cc5b1a3c to your computer and use it in GitHub Desktop.
// 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