package main
import (
"time"
"fmt"
"github.com/golang-common-packages/concurrency"
)
func main() {
func1 := func() {
for char := 'a'; char < 'a' + 3; char++ {
fmt.Printf("%c ", char)
}
}
func2 := func() {
for number := 1; number < 4; number++ {
fmt.Printf("%d ", number)
}
}
Con := &Concurrency.Concurrent{}
Con.Parallelize(func1, func2) // a 1 b 2 c 3
Con.ParallelizeTimeout(time.Minute, func1, func2) // a 1 b 2 c 3
}