Skip to content

lacdon/gopool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gopool

go routine pool

Usage

package main
import "github.com/lacdon/gopool"
import "fmt"
import "time"

func main() {
    poolWorkerSize := uint(1000)
    p, err := gopool.New(poolWorkerSize)
    if err != nil {
    panic(err)
    }
    for i:= 0 ; i <= 99999; i++ {
        job := func() {
            fmt.Println(time.Now().String())
        }
        go p.Dispatch(job)
    }
}

About

go routine pool

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages