Commit graph

2 commits

Author SHA1 Message Date
Ryota
711394d51f
Fix typo, add more test cases for atomicutil, and mention about atomic.Pointer migration (#5736)
I found the `atomicutil` package used throughout the code base, but it
seems to predate the addition of `atomic.Pointer[T]`. Potentially this
should allow us to remove the package altogether and use stdlib directly
instead. But I went ahead with starting with adding simple test cases
first, so that we have better test coverage across the code base.

Also, I added an example of how `atomicutil` usage may be problematic in
some specific scenario compared to how it's implemented with
`atomic.Pointer[T]`. Not to mention, there is some performance gain of
not using the direct casting with its generic support. (Though this is
probably a minor one and the code clarity is a benefit we may want to
keep rather than using other atomic values such as `atomic.Bool`.)

---------

Co-authored-by: Kenneth Jenkins <51246568+kenjenkins@users.noreply.github.com>
2025-07-22 15:11:30 -07:00
Caleb Doxsey
0ac7e45a21
atomicutil: use atomicutil.Value wherever possible (#3517)
* atomicutil: use atomicutil.Value wherever possible

* fix test

* fix mux router
2022-07-28 15:38:38 -06:00