You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: support Go 1.23+ timer & ticker channel behavior (#23)
fixes#22
Changes mock ticker and timer implementations based on channels to match Go 1.23+. c.f. https://go.dev/wiki/Go123Timer
1. Channels for tickers and timers are now unbuffered.
2. Channels reads will block after `Stop()` returns.
3. We use goroutines to write to the unbuffered channels. In order to avoid leaking go routines, when the test ends, any uncompleted channel writes are abandoned. This means that reads from the channels will block after the test exits. This is usually what you want, but is a small difference in behavior from before, where we wrote to a _buffered_ channel, and so reads could complete after the test completed.
0 commit comments