Skip to content

Conversation

appleboy
Copy link
Member

  • Enable race condition detection in Go tests by adding -race flag
  • Refactor Queue to use a local variable for workerCount with proper locking
  • Refactor Ring to use a local variable for count with proper locking and defer unlocking
  • Replace direct access to busyWorkers metric with BusyWorkers() method in tests

- Enable race condition detection in Go tests by adding `-race` flag
- Refactor `Queue` to use a local variable for `workerCount` with proper locking
- Refactor `Ring` to use a local variable for `count` with proper locking and defer unlocking
- Replace direct access to `busyWorkers` metric with `BusyWorkers()` method in tests

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
@appleboy appleboy merged commit 043417e into master Feb 18, 2024
@appleboy appleboy deleted the testing branch February 18, 2024 03:06
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.

1 participant