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

Hotswap#get scaladoc/impl mismatch #3840

Closed
durban opened this issue Sep 20, 2023 · 2 comments · Fixed by #3841
Closed

Hotswap#get scaladoc/impl mismatch #3840

durban opened this issue Sep 20, 2023 · 2 comments · Fixed by #3841
Labels

Comments

@durban
Copy link
Contributor

durban commented Sep 20, 2023

The scaladoc of Hotswap#get says that "The returned resource is guaranteed to be available for the duration of the returned resource". I don't think this is true: if the whole Hotswap is finalized, the "returned resource" will be finalized too (here:

case Acquired(_, finalizer) => finalizer
).

I think either the scaladoc or the implementation should be changed. (Probably the scaladoc, although I've never used Hotswap.)

@armanbilge
Copy link
Member

Thanks, that's actually a bug. We should make sure to acquire an exclusive lock before finalizing.

@durban
Copy link
Contributor Author

durban commented Sep 26, 2023

Fixed by #3841.

@durban durban closed this as completed Sep 26, 2023
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 a pull request may close this issue.

2 participants