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 race conditions #967

Merged
merged 1 commit into from
May 25, 2021
Merged

Conversation

sysadmind
Copy link
Contributor

  • Add workaround for package level variables in gin framework
  • Add mutext around Scheduler.started to prevent concurrent modifications
  • Scheduler.Started renamed to .started as a private property, Ability to query on started status now through Started()

These changes allow the tests to be run with the -race flag and not return any warnings about race conditions.

Fixes #951

- Add workaround for package level variables in gin framework
- Add mutext around Scheduler.started to prevent concurrent modifications

These changes allow the tests to be run with the -race flag and not return any warnings about race conditions.
@sysadmind
Copy link
Contributor Author

This test seems to intermittently fail now for me which makes me believe that it is a result of these changes, but it is not very clear as to why. I'll dig in further as I have time.

@sysadmind
Copy link
Contributor Author

close/reopen to trigger CI

Copy link
Member

@vcastellm vcastellm left a comment

Choose a reason for hiding this comment

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

Awesome! Thanks

@vcastellm vcastellm merged commit d1db732 into distribworks:master May 25, 2021
@sysadmind sysadmind deleted the fix-race-conditions branch May 27, 2021 13:54
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.

Many race conditions
2 participants