Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: uber-go/atomic
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.9.0
Choose a base ref
...
head repository: uber-go/atomic
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.11.0
Choose a head ref
  • 17 commits
  • 40 files changed
  • 7 contributors

Commits on Mar 15, 2022

  1. Configuration menu
    Copy the full SHA
    adc54d9 View commit details
    Browse the repository at this point in the history

Commits on May 6, 2022

  1. Configuration menu
    Copy the full SHA
    f9aa9cb View commit details
    Browse the repository at this point in the history

Commits on Aug 5, 2022

  1. Configuration menu
    Copy the full SHA
    976602f View commit details
    Browse the repository at this point in the history
  2. all: Update copyright notices (#112)

    This will reduce noise in other PRs.
    abhinav authored Aug 5, 2022
    Configuration menu
    Copy the full SHA
    122c956 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    edb52d7 View commit details
    Browse the repository at this point in the history
  4. ci: Test with Go 1.19 (#113)

    Test against Go 1.19 and lint only for the latest version.
    Update to latest staticcheck to work with 1.19.
    abhinav authored Aug 5, 2022
    Configuration menu
    Copy the full SHA
    d15bdad View commit details
    Browse the repository at this point in the history

Commits on Aug 6, 2022

  1. Configuration menu
    Copy the full SHA
    01497d2 View commit details
    Browse the repository at this point in the history
  2. Add CompareAndSwap and Swap, Deprecate CAS (#111)

    Adds CompareAndSwap and Swap methods to String, Error, and Value,
    implemented by making use of Value.CompareAndSwap and Value.Swap
    added in Go 1.17.
    
    Following that, add CompareAndSwap to all other types with "CAS" methods
    and deprecate CAS in favor of CompareAndSwap, since that's the convention
    the standard library chose for these in Go 1.19.
    eNV25 authored Aug 6, 2022
    Configuration menu
    Copy the full SHA
    d4bbbc8 View commit details
    Browse the repository at this point in the history

Commits on Aug 9, 2022

  1. Configuration menu
    Copy the full SHA
    d144bb6 View commit details
    Browse the repository at this point in the history
  2. Add Pointer[T] (#116)

    Adds a Pointer[T] type that provide the same functionality as
    Go 1.19's `sync/atomic.Pointer[T]` in both, Go 1.18 and 1.19.
    
    In Go 1.19, this uses the standard library's implementation,
    and in 1.18 our own custom implementation based on UnsafePointer.
    For Go 1.17, even though it's now unsupported, this is a no-op.
    
    Refs GO-1572
    Resolves #115
    abhinav authored Aug 9, 2022
    Configuration menu
    Copy the full SHA
    2ab21d8 View commit details
    Browse the repository at this point in the history

Commits on Aug 11, 2022

  1. Prepare release v1.10.0 (#118)

    Prepare a new release with the following changes:
    v1.9.0...2ab21d8
    abhinav authored Aug 11, 2022
    Configuration menu
    Copy the full SHA
    9680036 View commit details
    Browse the repository at this point in the history

Commits on Sep 6, 2022

  1. chore(gen-*): Move templates into external files (#121)

    This moves the templates used by gen-atomicint and gen-atomicwrapper
    into external files embedded into the corresponding gen binary with
    go:embed.
    abhinav authored Sep 6, 2022
    Configuration menu
    Copy the full SHA
    159e329 View commit details
    Browse the repository at this point in the history

Commits on Sep 20, 2022

  1. Implement String method for pointers (#122)

    * Implement String method for pointers
    
    By implementing this method ourselves using atomic
    loading and fmt.Sprint, we can avoid possible unguarded
    accesses to the embedded pointer if someone attempts to
    fmt.Print the atomic.Pointer
    .
    
    * Use Pointer.Load, not wrapped.Load
    
    Co-authored-by: Abhinav Gupta <[email protected]>
    josephinedotlee and abhinav authored Sep 20, 2022
    Configuration menu
    Copy the full SHA
    78a3b8e View commit details
    Browse the repository at this point in the history

Commits on Feb 6, 2023

  1. Fix Swap and CompareAndSwap for Value wrappers (#130)

    * Regenerate code to update copyright end year to 2023
    
    * Test behaviour of default values initialized in different ways
    
    This adds repro tests for #126 and #129
    
    * Fix Swap and CompareAndSwap for Value wrappers
    
    Fixes #126, #129
    
    All atomic types can be used without initialization, e.g., `var v
    <AtomicType>`. This works fine for integer types as the initialized
    value of 0 matches the default value for the user-facing type.  However,
    for Value wrappers, they are initialized to `nil`, which is a value that
    can't be set (triggers a panic) so the default value for the user-facing
    type is forced to be stored as a different value. This leads to multiple
    possible values representing the default user-facing type.
    
    E.g., an `atomic.String` with value `""` may be represented by the
    underlying atomic as either `nil`, or `""`. This causes issues when we
    don't handle the `nil` value correctly, causing to panics in `Swap` and
    incorrectly not swapping values in `CompareAndSwap`.
    
    This change fixes the above issues by:
     * Requiring `pack` and `unpack` function in gen-atomicwrapper as the
       only place we weren't supplying them was for `String`, and the
       branching adds unnecessary complexity, especially with added `nil`
       handling.
     * Extending `CompareAndSwap` for `Value` wrappers to try an additional
       `CompareAndSwap(nil, <new>)` only if the original `CompareAndSwap`
       fails and the old value is the zero value.
    prashantv authored Feb 6, 2023
    Configuration menu
    Copy the full SHA
    1505d28 View commit details
    Browse the repository at this point in the history

Commits on Mar 20, 2023

  1. Minimize permissions to CI workflows (#133)

    Set only read permission on CI workflows since they don't need write access.
    
    Fixes #132.
    sywhang authored Mar 20, 2023
    Configuration menu
    Copy the full SHA
    544d6aa View commit details
    Browse the repository at this point in the history

Commits on May 2, 2023

  1. Preparing release v1.11.0

    manjari25 committed May 2, 2023
    Configuration menu
    Copy the full SHA
    2a750c4 View commit details
    Browse the repository at this point in the history

Commits on May 3, 2023

  1. Update CHANGELOG.md

    manjari25 committed May 3, 2023
    Configuration menu
    Copy the full SHA
    76f817c View commit details
    Browse the repository at this point in the history
Loading