10000 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
Grab lock *before* getting enumerator
  • Loading branch information
abessen committed Nov 4, 2016
commit bce86dce6aa767f19cf9611fca654f36f3afdf25
3 changes: 2 additions & 1 deletion src/runtime/assemblymanager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -535,12 +535,13 @@ private class Enumerator : IEnumerator<Assembly>
public Enumerator(AssemblyList assemblyList)
{
_assemblyList = assemblyList;
_listEnumerator = _assemblyList._list.GetEnumerator();
_assemblyList._lock.EnterReadLock();
_listEnumerator = _assemblyList._list.GetEnumerator();
}

public void Dispose()
{
_listEnumerator.Dispose();
_assemblyList._lock.ExitReadLock();
}

Expand Down
0