When multiple goroutines share access to a value that will periodically change, readers may wish to wait for a value to be updated before reading the value again. This can be solved using a condition variable:
var val *Thing
var mu = new(sync.Mutex)
var cond = sync.NewCond(mu)
func wait(old *Thing) *Thing {