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 in executor with enabling the limit mode #474

Merged
merged 1 commit into from
May 7, 2023

Conversation

git-hulk
Copy link

@git-hulk git-hulk commented May 7, 2023

What does this do?

The root cause is we write the limitModeFuncsRunning(a wait group) in the new goroutine, so the Go data race detector will think they have the data race due to reading and writing in different routines.

I'm sorry for didn't run tests in data race mode in the previous PR. @JohnRoesler

Which issue(s) does this PR fix/relate to?

Fix the data race in https://github.com/go-co-op/gocron/actions/runs/4905158223/jobs/8758756592

List any changes that modify/break current functionality

None

Have you included tests for your changes?

None

Did you document any new/modified functionality?

  • Updated example_test.go
  • Updated README.md

Notes

The root cause is we write the limitModeFuncsRunning(a wait group)
in the new goroutine, so the Go data race detector will think them
have the data race due to reading and writing in different routines.
@JohnRoesler JohnRoesler merged commit 2936a47 into go-co-op:main May 7, 2023
@JohnRoesler
Copy link
Contributor

Thank you

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