go-async

Build Coverage Status License

Documentation

GoDoc

Full go doc style documentation for the project can be viewed online without installing this package by using the excellent GoDoc site here: http://godoc.org/github.com/41north/go-async

You can also view the documentation locally once the package is installed with the godoc tool by running godoc -http=":6060" and pointing your browser to http://localhost:6060/pkg/github.com/41north/go-async

Installation

$ go get -u github.com/41north/go-async

Quick Start

Future

Add this import line to the file you’re working in:

import "github.com/41north/go-async/pkg/async"

A basic example:

// create a string future
f := NewFuture[string]()

// create a consumer channel
ch := f.Get()
go func() {
	println(fmt.Sprintf("Value: %s", <-ch))
}()

// set the value
f.Set("hello")

There are more examples available in the go doc.

License

Go-async is licensed under the Apache 2.0 License

Contact

If you want to get in touch drop us an email at [email protected]

GitHub

View Github