Created
June 8, 2014 17:56
-
-
Save bolilla/502af0258240a9496aa9 to your computer and use it in GitHub Desktop.
GoPadawan Concurrencia Librerías CON WaitGroup
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" | |
"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