- Now resources can be removed
- Little patch to ConcreteHistory to make it remove emptied requests after a resource removal. I hope this will not break anything... git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@926 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
ba00eac7f0
commit
82b4105519
5 changed files with 380 additions and 253 deletions
|
@ -174,7 +174,7 @@ ConcreteHistory::remove(resource_key_t resource_key)
|
|||
for (Threads::iterator it2 = threads.begin(); it2 != threads.end(); it2++)
|
||||
{
|
||||
Requests& reqs = (*it2)->get_dynamic_requests();
|
||||
for (Requests::iterator it3 = reqs.begin(); it3 != reqs.end(); it3++)
|
||||
for (Requests::iterator it3 = reqs.begin(); it3 != reqs.end();)
|
||||
{
|
||||
SubRequests& subr = (*it3)->get_dynamic_subrequests();
|
||||
SubRequests::iterator it4 = subr.begin();
|
||||
|
@ -186,6 +186,12 @@ ConcreteHistory::remove(resource_key_t resource_key)
|
|||
}
|
||||
else
|
||||
it4++;
|
||||
|
||||
// erase empty requests
|
||||
if(subr.size() == 0)
|
||||
it3 = reqs.erase(it3);
|
||||
else
|
||||
++it3;
|
||||
}
|
||||
}
|
||||
} //~ end monstrous construct, "The Thing That Should Not Be"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue