chore(deps): update module github.com/puzpuzpuz/xsync/v3 to v4 #2464
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
This PR contains the following updates:
v3.5.1->v4.2.0Release Notes
puzpuzpuz/xsync (github.com/puzpuzpuz/xsync/v3)
v4.2.0Compare Source
Map#178runtime.cheaprandinstead offastrand#177Introduces cooperative rehashing for
xsync.Mapthis means that goroutines that execute write operations, such asComputeorStore, may participate in table rehashing when the hash table grows or shrinks. From now on, table rehashing never spawns additional goroutines.This behavior is always enabled, so the
WithSerialResizefunction is now marked as deprecated and acts as a no-op.v4.1.0Compare Source
UMPSCQueue#168LoadAndDeleteandDeletein case of non-existingMapkey #167Mapresize #170UMPSCQueueis meant to serve as a replacement for a channel. However, crucially, it has infinite capacity. This is a very bad idea in many cases as it means that it never exhibits backpressure. In other words, if nothing is consuming elements from the queue, it will eventually consume all available memory and crash the process. However, there are also cases where this is desired behavior as it means the queue will dynamically allocate more memory to store temporary bursts, allowing producers to never block while the consumer catches up.From now on,
Mapspawns additional goroutines to speed up resizing the hash table. This can be disabled when creating aMapwith the newWithSerialResizesetting:Thanks @PapaCharlie and @llxisdsh for the contributions!
v4.0.0Compare Source
MapOf's hasher API is gone. The default and only hash function is now based onmaphash.Comparable.Map'sComputeAPI now supports no-op (cancel) compute operation.Thanks @PapaCharlie for making this release happen
Migration notes
*Oftypes are kept as type aliases for the renamed data structures to simplify the migration, e.g.MapOfis an alias forMap.NewMapOfPresizedfunction is gone.NewMapcombined withWithPresizeshould be used instead.Map.Computemethod now expectsvalueFnto return aComputeOpvalue instead of a boolean flag. That's to support compute operation cancellation, so that the call does nothing.Map.LoadOrTryComputemethod is renamed toLoadOrCompute. The oldLoadOrComputemethod is removed as it was redundant.Configuration
📅 Schedule: Branch creation - Between 12:00 AM and 03:59 AM, only on Monday ( * 0-3 * * 1 ) (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.