Skip to content

AsyncSingletonProvider: double-checked locking pattern - #2078

Merged
gino-m merged 5 commits into
google:masterfrom
hoc081098:hoc081098-patch-1
Nov 29, 2023
Merged

gino-m merged 5 commits into
google:masterfrom
hoc081098:hoc081098-patch-1

Conversation

@hoc081098

@hoc081098 hoc081098 commented Nov 25, 2023 •

Copy link
Copy Markdown
Contributor

Will close #2079

  • refactor AsyncSingletonProvider: use double-checked locking pattern

@hoc081098 hoc081098 changed the title AsyncSingletonProvider: doubled-checked locking pattern AsyncSingletonProvider: double-checked locking pattern Nov 25, 2023
@gino-m

gino-m commented Nov 27, 2023

Copy link
Copy Markdown
Collaborator

Thanks @hoc081098!
/gcbrun

@hoc081098

Copy link
Copy Markdown
Contributor Author

@gino-m, it looks like the code does not conform the expected format.
Could you please show me the log 😇?

@gino-m

gino-m commented Nov 28, 2023

Copy link
Copy Markdown
Collaborator

@gino-m, it looks like the code does not conform the expected format. Could you please show me the log 😇?

Sure! It appears to be a formatting issue:

Execution failed for task ':workspace:ground:ktfmtCheckMain'.
[ktfmt] Found 1 files that are not properly formatted:
/workspace/ground/src/main/java/com/google/android/ground/util/AsyncSingletonProvider.kt

Can you try running gradle ktfmtFormat? There are a few edge cases where Android Studio ktfmt plugin doesn't apply the same rules as the Gradle ktfmt plugin.

@hoc081098

Copy link
Copy Markdown
Contributor Author

@gino-m I have formatted code 🙏

@gino-m

gino-m commented Nov 29, 2023

Copy link
Copy Markdown
Collaborator

/gcbrun

@gino-m gino-m left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM. Thanks for the fix!

@gino-m
gino-m merged commit c10c2af into google:master Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

Refactor AsyncSingletonProvider to use double-checked locking.

2 participants