Skip to content

Instantly share code, notes, and snippets.

@mekanoe
Created December 19, 2017 23:05
Show Gist options
  • Save mekanoe/322768fdd99e17f316a1657dc6958d1e to your computer and use it in GitHub Desktop.
Save mekanoe/322768fdd99e17f316a1657dc6958d1e to your computer and use it in GitHub Desktop.
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