fake.AfterFunc synchronization improvements
Provide guarantees about AfterFunc
goroutines having scheduled by the time fake.Clock.Advance
and fake.Clock.SetClock
have returned.
Similarly, add a sync.WaitGroup
to track the completion of AfterFunc
callbacks (and expose it via the new fake.Clock.WaitAfterFuncs()
).