-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Implement AsyncLazyInitializer #31060
base: main
Are you sure you want to change the base?
Conversation
FWIW, we recently added an |
You should rename that type to avoid confusion with
This type is JTF-agnostic. |
828f10e
to
41d74d9
Compare
This was also taken directly from
The new hyperlinking support of Quick Info should help with clarity here. With that said,
Overloads are provided that support automatically releasing unused values.
Each helper is now used from two locations.
I'm not aware of an alternative. The API is still cleaner than trying to inline the functionality correctly.
Done.
Adding some comments to clarify the weirdness here. |
This is a supporting type for #30929, but can also support many other use cases where lock-free optimistic initialization is desirable but the initialization function is asynchronous.