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

Razor synchronize loader #76357

Merged
merged 9 commits into from
Dec 12, 2024
Prev Previous commit
Next Next commit
Capture the state of the resolver under the lock for determinism
  • Loading branch information
chsienki committed Dec 11, 2024
commit 24c3a1ff03ee72703eacda06e8edb131b4fbe572
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,14 @@ internal static bool TrySetAssemblyResolver(Func<AssemblyName, Assembly?> resolv

public Assembly? ResolveAssembly(AssemblyName assemblyName)
{
Func<AssemblyName, Assembly?>? resolver = null;
lock (s_resolverLock)
{
s_assembliesRequested.Add(assemblyName);
resolver = s_assemblyResolver;
}

return s_assemblyResolver?.Invoke(assemblyName);
return resolver?.Invoke(assemblyName);
}
}
}
Loading