Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix data race on worker stop #3016

Merged
merged 1 commit into from
Sep 25, 2024
Merged

Fix data race on worker stop #3016

merged 1 commit into from
Sep 25, 2024

Conversation

DrJosh9000
Copy link
Contributor

Description

Fix a data race on AgentWorker.stopping by guarding the read with the same mutex that already guards the write.

Context

Noticed when running an agent build with -race enabled.

Testing

  • Tests have run locally (with go test ./...). Buildkite employees may check this if the pipeline has run automatically.
  • Code is formatted (with go fmt ./...)

@DrJosh9000 DrJosh9000 merged commit ede74b8 into main Sep 25, 2024
1 check passed
@DrJosh9000 DrJosh9000 deleted the fix-data-race-on-interrupt branch September 25, 2024 01:53
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