fixed handshake test; wrote broken read/write test

This commit is contained in:
Jae Kwon
2015-07-14 22:35:32 -07:00
parent dbef516659
commit 4981a5993d
4 changed files with 109 additions and 30 deletions
+15
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()
}