Skip to content

Conversation

@juejinyuxitu
Copy link
Contributor

use WaitGroup.Go to simplify code.

More info can see: golang/go#63796

Signed-off-by: juejinyuxitu <juejinyuxitu@outlook.com>
@juejinyuxitu juejinyuxitu requested a review from a team as a code owner September 24, 2025 16:09
@graphite-app
Copy link

graphite-app bot commented Sep 24, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • Queue - adds this PR to the back of the merge queue
  • Hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@macroscopeapp
Copy link

macroscopeapp bot commented Sep 24, 2025

Refactor the redis.TestRedisGetNonce_ConsumeManyConcurrent test in manager_test.go to use WaitGroup.Go for launching concurrent work

The test redis.TestRedisGetNonce_ConsumeManyConcurrent in manager_test.go replaces manual goroutine management using wg.Add(1), defer wg.Done(), and go func(){...} with a single call to wg.Go(func(){...}) inside the loop.

📍Where to Start

Start with the loop that launches concurrent nonce retrieval and consumption in redis.TestRedisGetNonce_ConsumeManyConcurrent within manager_test.go.


Macroscope summarized e3ba026.

Copy link
Collaborator

@mkysel mkysel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the simplification!

@mkysel mkysel merged commit a9ff2db into xmtp:main Sep 24, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants