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

Use atomic.Bool to store whether a rungroup actor has already been interrupted #2010

Closed
RebeccaMahany opened this issue Dec 19, 2024 · 0 comments · Fixed by #2012
Closed

Comments

@RebeccaMahany
Copy link
Contributor

Many of our rungroup actors contain interrupt chan struct{} and interrupted bool fields within their structs. We use the interrupted bool to prevent accidentally running shutdown routines twice; rungroup actors should be able to have their shutdown functions called multiple times.

However, interrupted bool can cause data races in tests. We should update to use atomic.Bool in all rungroup actors that have an interrupt and interrupted field.

We can use James's work in #1977 as an example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant