Created
February 13, 2021 02:21
-
-
Save shazadbrohi/8123bd225e486158067ea45937c1dd3d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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