Created
December 19, 2017 23:05
-
-
Save mekanoe/322768fdd99e17f316a1657dc6958d1e 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
package main | |
import "fmt" | |
import "sync" | |
import "time" | |
func main() { | |
var m sync.WaitGroup | |
fmt.Println("ok it's running boyo") | |
m.Add(1) | |
a := false | |
go func() { | |
for { | |
time.Sleep(10 * time.Second) | |
a = !a | |
} | |
}() | |
m.Wait() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment