func New() *Future {
	return &Future{
		completed: make(chan struct{}),
		cancelled: make(chan struct{}),
	}
}
New will return a new Future.
package future
import (
	"errors"
	"sync"
	"time"
)
var ErrTimeout = errors.New("future timeout")
var ErrCanceled = errors.New("future canceled")
type Future struct {
	result    interface{}
	completed chan struct{}
	cancelled chan struct{}
	futures   []*Future
	done      bool
	mutex     sync.Mutex
}