memory
memory copied to clipboard
add Reporter utility
It would be useful to get notifications when long-running code uses too much memory. Then it could dynamically tune parallelism to ensure it doesn't overcommit.
Something similar to this interface would likely work:
type ReporterFunc func(percent float64)
func NewReporter(interval time.Duration, reporter ReporterFunc)