Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import "fmt"
- func main() {
- // launch goroutine in background
- go func() {
- fmt.Println("Hello, playground")
- }()
- //
- // Does not print anything
- //
- // when main returns
- // the program exits
- // and the goroutine will not be run
- // and gets garbage-collected
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement