Skip to content

Instantly share code, notes, and snippets.

@shazadbrohi
Created February 13, 2021 02:21
Show Gist options
  • Save shazadbrohi/8123bd225e486158067ea45937c1dd3d to your computer and use it in GitHub Desktop.
Save shazadbrohi/8123bd225e486158067ea45937c1dd3d to your computer and use it in GitHub Desktop.
f, err := os.Create("/tmp/concurrency_in_go.txt")
if err != nil{
panic(err)
}
defer f.Close()
for i := 1; i <= 3; i++ {
wg.Add(1)
go worker(i, &wg, f)
}
wg.Wait()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment