You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As indicated by a recent CI failure, SingletonSupplier has a potential race condition in terms of concurrent visibility of its singletonInstance and initialized field updates: If an initialized update gets reordered to become visible first, a still null singletonInstance field may get returned despite the initialized value being non-null (but not fully visible yet).
This can be made more defensive by forcing the singletonInstance/initialized access sequence happening within the full initialization lock, accepting the locking overhead for pre-initialized null values in favor of a defensive fast path for non-null values.