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 concurrency issue in SafeLazy #740

Merged
merged 1 commit into from Feb 22, 2020
Merged

Conversation

eed3si9n
Copy link
Member

@eed3si9n eed3si9n commented Feb 21, 2020

There's been some reports of concurrency issue around SafeLazy, so I am porting @mspnf's SafeLazy fix to open source, implemented prior to #731.

By storing the thunk and the result as final fields of a contained class, we ensure that they will will always be in sync with each other when used, without actually locking anything.

@lightbend-cla-validator

This comment has been minimized.

By storing the thunk and the result as final fields of a contained class, we ensure that they will will always be in sync with each other when used, without actually locking anything.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants