8000 Assemblymanager thread safety by ArvidJB · Pull Request #277 · pythonnet/pythonnet · GitHub
[go: up one dir, main page]

Skip to content

Assemblymanager thread safety #277

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

Merged
merged 14 commits into from
Nov 17, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use atomic TryAdd call here as well
  • Loading branch information
abessen committed Oct 27, 2016
commit 596c210728ee67158eecbf0d7968c1360f4f008d
5 changes: 2 additions & 3 deletions src/runtime/assemblymanager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -378,10 +378,9 @@ internal static void ScanAssembly(Assembly assembly)
}
}

if (ns != null && !namespaces[ns].ContainsKey(assembly))
if (ns != null)
{
if (!namespaces[ns].TryAdd(assembly, String.Empty))
throw new ArgumentException("Adding duplicate assembly " + assembly);
namespaces[ns].TryAdd(assembly, String.Empty);
}

if (ns != null && t.IsGenericTypeDefinition)
Expand Down
0