Skip to content

Instantly share code, notes, and snippets.

@rutsky
rutsky / README.md
Created July 17, 2018 22:41
cgo race condition example

Ran on a laptop with 4 cores.

$ go version
go version go1.10.1 linux/amd64
$ go run cgo.go 
panic: Iteration 39068207 - receive: "y" != "\x00"

goroutine 5 [running]:
main.main.func1()