Comparing v0.6.0...v0.11.0 · golang/time (original) (raw)

Commits on Oct 1, 2024

  1. x/time/rate: correctly handle 0 limits
    Decrementing the burst in the reserveN method will frequently lead to us
    setting the burst to 0 which makes the limiter mostly unusable.
    This code was originally added in https://go.dev/cl/323429 to fix #39984
    but the implementation introduced a different bug. To avoid regressing
    to the behaviour described in #39984, pre-fill the limiter to the burst
    value in the constructor.
    Fixes #68541
    Change-Id: Iab3b85d548a44fcb2d058336e5bbf11b19ea67b1
    Reviewed-on: https://go-review.googlesource.com/c/time/+/600876
    Reviewed-by: Sameer Ajmani sameer@golang.org
    LUCI-TryBot-Result: Go LUCI golang-scoped@luci-project-accounts.iam.gserviceaccount.com
    Reviewed-by: Michael Knyszek mknyszek@google.com
    Auto-Submit: Sameer Ajmani sameer@golang.org
    @leesio @gopherbot
    Configuration menu
    Browse the repository at this point in the history

Commits on Nov 2, 2024

  1. README: don't recommend go get
    These days people will just import the packages and the go tool will
    do the right thing. We don't need to explain it.
    Add a pointer to the git repo, though.
    For golang/go#62645
    Change-Id: I87fbf5d50e75120052f56ed6d4ac9977056cde9f
    Reviewed-on: https://go-review.googlesource.com/c/time/+/624235
    LUCI-TryBot-Result: Go LUCI golang-scoped@luci-project-accounts.iam.gserviceaccount.com
    Reviewed-by: Ian Lance Taylor iant@google.com
    Commit-Queue: Ian Lance Taylor iant@google.com
    Reviewed-by: Dmitri Shuralyov dmitshur@google.com
    Auto-Submit: Ian Lance Taylor iant@google.com
    Reviewed-by: Dmitri Shuralyov dmitshur@golang.org
    @ianlancetaylor @gopherbot
    Configuration menu
    Browse the repository at this point in the history

Commits on Jan 3, 2025

  1. Configuration menu
    Browse the repository at this point in the history

Commits on Jan 8, 2025

  1. rate: prevent overflows when calculating durationFromTokens
    Currently, there is a conversion from float64 to int64 when returning the duration needed to accumulate the required number of tokens.
    When limiters are set with low limits, i.e. 1e-10, the duration needed is greater than math.MaxInt64.
    As per the language specifications, in these scenarios the outcome is implementation determined.
    This results in overflows on amd64, resulting in no wait, effectively jamming the limiter open.
    Here we add a check for this scenario, returning InfDuration if the desired duration is greater than math.MaxInt64.
    Fixes golang/go#71154
    Change-Id: I775aab80fcc8563a59aa399844a64ef70b9eb76a
    Reviewed-on: https://go-review.googlesource.com/c/time/+/641336
    Reviewed-by: Dmitri Shuralyov dmitshur@google.com
    Auto-Submit: Ian Lance Taylor iant@google.com
    LUCI-TryBot-Result: Go LUCI golang-scoped@luci-project-accounts.iam.gserviceaccount.com
    Reviewed-by: Ian Lance Taylor iant@google.com
    @tomcoupland @gopherbot
    Configuration menu
    Browse the repository at this point in the history

Commits on Feb 6, 2025

  1. Configuration menu
    Browse the repository at this point in the history

Commits on Feb 14, 2025

  1. Configuration menu
    Browse the repository at this point in the history