Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save bolilla/502af0258240a9496aa9 to your computer and use it in GitHub Desktop.
Save bolilla/502af0258240a9496aa9 to your computer and use it in GitHub Desktop.
GoPadawan Concurrencia Librerías CON WaitGroup
package main
import (
"fmt"
"sync"
)
func funcioncilla(wg *sync.WaitGroup) {
fmt.Println("Padawan en una funcioncilla")
wg.Done()
}
func main() {
wg := new(sync.WaitGroup)
wg.Add(2)
go funcioncilla(wg)
go funcioncilla(wg)
wg.Wait()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment