func (d *Instance) Wait() <-chan struct{} {
	return d.c
}
Wait returns a channel for waiting for done.
package done
import (
	"sync"
)
type Instance struct {
	access sync.Mutex
	c      chan struct{}
	closed bool
}
func New() *Instance {
	return &Instance{
		c: make(chan struct{}),
	}
}
func (d *Instance) Done() bool {
	select {
	case <-d.Wait():
		return true
	default:
		return false
	}
}