Created
February 16, 2022 23:12
-
-
Save countingtoten/767aa4abe2fe271cf60b15357ac94335 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" | |
"time" | |
"sync" | |
) | |
func main() { | |
wg := &sync.WaitGroup{} | |
wg.Add(1) | |
go func() { | |
defer wg.Done() | |
// Do work here. | |
}() | |
wg.Wait() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment