AtomicMin is a thread-safe Min container - hasValue indicator true if a value was equal to or greater than threshold - optional threshold for minimum accepted Min value - — - wait-free CompareAndSwap mechanic
| 20 | // - — |
| 21 | // - wait-free CompareAndSwap mechanic |
| 22 | type AtomicMin struct { |
| 23 | |
| 24 | // value is current Min |
| 25 | value atomic.Float64 |
| 26 | // whether [AtomicMin.Value] has been invoked |
| 27 | // with value equal or greater to threshold |
| 28 | hasValue atomic.Bool |
| 29 | } |
| 30 | |
| 31 | // NewAtomicMin returns a thread-safe Min container |
| 32 | // - if threshold is not used, AtomicMin is initialization-free |
nothing calls this directly
no outgoing calls
no test coverage detected