(max uint64)
| 291 | } |
| 292 | |
| 293 | func (m *XidMap) updateMaxSeen(max uint64) { |
| 294 | for { |
| 295 | prev := atomic.LoadUint64(&m.maxUidSeen) |
| 296 | if prev >= max { |
| 297 | return |
| 298 | } |
| 299 | if atomic.CompareAndSwapUint64(&m.maxUidSeen, prev, max) { |
| 300 | return |
| 301 | } |
| 302 | } |
| 303 | } |
| 304 | |
| 305 | // BumpTo can be used to make Zero allocate UIDs up to this given number. Attempts are made to |
| 306 | // ensure all future allocations of UIDs be higher than this one, but results are not guaranteed. |