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

Acquire exclusive lock before finalizing Hotswap #3841

Merged
merged 3 commits into from
Sep 25, 2023

Conversation

armanbilge
Copy link
Member

Fixes #3840.

@armanbilge armanbilge linked an issue Sep 21, 2023 that may be closed by this pull request
Comment on lines 114 to 126
def finalize(state: Ref[F, State]): F[Unit] =
def finalize(state: Ref[F, State]): F[Unit] = exclusive.surround {
state.getAndSet(Finalized).flatMap {
case Acquired(_, finalizer) => finalizer
case Cleared => F.unit
case Finalized => raise("Hotswap already finalized")
}
}
Copy link
Member Author

Choose a reason for hiding this comment

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

Actually we should probably keep this more tightly scoped.

@djspiewak djspiewak merged commit bd02450 into typelevel:series/3.5.x Sep 25, 2023
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hotswap#get scaladoc/impl mismatch
2 participants