Skip to content
/ async Public

A collection of methods for running functions concurrently.

License

Notifications You must be signed in to change notification settings

eleniums/async

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

async

Build Status Go Report Card GoDoc License: MIT

A collection of methods for running functions concurrently.

Installation

go get -u github.com/eleniums/async/v2

Example

Create some tasks to run:

foo := func() error {
    // do something
    return nil
}

bar := func() error {
    // do something else
    return nil
}

Run the tasks concurrently:

errc := async.Run(foo, bar)
err := async.Wait(errc)
if err != nil {
    log.Fatalf("task returned an error: %v", err)
}