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
{{ message }}
Repository navigation
Uno.Extensions.Navigation.UI semantics around thread safety, loaded assemblies #2943
Generally, static members should be thread safe. AssemblyExtensions.Excludes is not: it's a List<string>, modifiable from AssemblyExtensions.SafeGetTypes(). If multiple threads try to use .SafeGetTypes() concurrently, .Excludes may be corrupted or the code may throw unexpectedly. OrRouteResolverDefault.LoadedTypes may throw if another thread modifies AssemblyExtensions.Excludes while it's executing.
Secondly, assembly loading semantics: RouteResolverDefault.LoadedTypes calls AppDomain.CurrentDomain.GetAssemblies() the first time it's invoked, saving the results. This seems somewhat "odd", in that nothing prevents assemblies from being loaded after the initial .LoadedTypes call, a'la:
App launches
App uses RouteResolverDefault.LoadedTypes, set of types is cached.
App uses Assembly.Load*() to load a new assembly.
Subsequent use of RouteResolverDefault.LoadedTypes doesn't see types from (3).
Activity