aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/unstable/cachebase.h22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/unstable/cachebase.h b/src/unstable/cachebase.h
index b17d377..3db257b 100644
--- a/src/unstable/cachebase.h
+++ b/src/unstable/cachebase.h
@@ -595,10 +595,24 @@ namespace Bu
595 { 595 {
596 for( typename CacheKeySet::iterator i = hChanged.begin(); i; i++ ) 596 for( typename CacheKeySet::iterator i = hChanged.begin(); i; i++ )
597 { 597 {
598 Entry *pEnt = hCacheEntry.get( i.getKey() ); 598 Entry *pEnt = NULL;
599 Bu::MutexLocker ml( pEnt->getMutex() ); 599 try
600 _save( pEnt->getPtr() ); 600 {
601 pEnt->getPtr()->changed( false ); 601 pEnt = hCacheEntry.get( i.getKey() );
602 }
603 catch( Bu::HashException )
604 {
605 // The entry wasn't there, most likely because it
606 // was deleted. That's ok.
607 }
608 // This isn't inside of the above because we want to be
609 // able to handle these exceptions differently.
610 if( pEnt )
611 {
612 Bu::MutexLocker ml( pEnt->getMutex() );
613 _save( pEnt->getPtr() );
614 pEnt->getPtr()->changed( false );
615 }
602 } 616 }
603 hChanged.clear(); 617 hChanged.clear();
604 } 618 }