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
}
-
Notifications
You must be signed in to change notification settings - Fork 1
golang-common-packages/concurrency
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
This package help you run multiple functions over concurrency
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published