fix for Ryan's issue: we also need to sync when we store a resource.

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3881 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
aaron 2010-07-26 22:17:47 +00:00
parent 8b072b59e2
commit 9667942e52
1 changed files with 6 additions and 3 deletions

View File

@ -67,9 +67,12 @@ abstract class ResourcePool <T,I extends Iterator> {
I iterator = createIteratorFromResource(segment, selectedResource);
// Make a note of this assignment for proper releasing later.
resourceAssignments.put(iterator, selectedResource);
// also protect the resource assignment
synchronized (this) {
// Make a note of this assignment for proper releasing later.
resourceAssignments.put(iterator, selectedResource);
}
return iterator;
}