Repository navigation
v0.4.0
Wait methods are expanded and simplified. A Wait method automatically retries rejected requests until tokens are available, or the passed context has been cancelled.
Changes:
-
We removed the best-effort FIFO ordering.
Waitmethods now offer no ordering guarantees, so the user must decide ifWaitis appropriate for their application.“Best effort” turns out to be a synonym for “unpredictable”: it would offer ordering 90% of the time, but then sometimes not. I believe this is worse than simply offering no promise.
-
Under the hood, we now use a
sync.Mutexinstead ofsync.RWMutex. I believe the concurrent reads were not offering much, or perhaps any, advantage.sync.Mutexis a smaller and simpler type.
Additions:
Wait,WaitWithDetailsandWaitWithDebugare now offered onLimiterandLimiters.