Skip to content

gersure/GoSlaves

Repository files navigation

GoSlaves

GoSlaves is a simple golang's library which can handle wide list of tasks asynchroniously

GoDoc Go Report Card

Installation

go get github.com/themester/GoSlaves

Example

  sp := slaves.MakePool(10)
  if err := sp.Open(func(obj interface{}) interface{} {
    fmt.Println(obj.(string))
    return nil
  }, nil); err != nil {
    panic(err)
  }
  defer sp.Close()

  files, err := ioutil.ReadDir(os.TempDir())
  if err == nil {
    fmt.Println("Files in temp directory:")
    for i := range files {
      sp.SendWork(files[i].Name())
    }
  }

About

Faster asynchonous thread pool for Golang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages