Skip to content

Instantly share code, notes, and snippets.

@hyper0x
Created May 14, 2015 10:15
Show Gist options
  • Save hyper0x/dfa1a03c33e954b0d88b to your computer and use it in GitHub Desktop.
Save hyper0x/dfa1a03c33e954b0d88b to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
)
func main() {
i, j := 0, 0
go func() {
for i < (1 << 30) {
i++
//fmt.Println("i-",i,j)
}
}()
for j < (1 << 30) {
j++
fmt.Println("j-", i, j)
}
fmt.Println("f-", i, j)
fmt.Println("f-", i, j)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment