move all files to common/ to begin repo merge

This commit is contained in:
Ethan Buchman
2017-04-18 16:33:22 -04:00
parent 5aecd32554
commit 356657a37b
22 changed files with 0 additions and 0 deletions

15
common/async.go Normal file
View File

@ -0,0 +1,15 @@
package common
import "sync"
func Parallel(tasks ...func()) {
var wg sync.WaitGroup
wg.Add(len(tasks))
for _, task := range tasks {
go func(task func()) {
task()
wg.Done()
}(task)
}
wg.Wait()
}