mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 00:32:57 -04:00
gobj: work around a deadlock in GeomCacheManager::flush()
This commit is contained in:
parent
c434e08a9c
commit
10fe8659c6
@ -13,7 +13,9 @@
|
||||
|
||||
#include "geomCacheManager.h"
|
||||
#include "geomCacheEntry.h"
|
||||
#include "geomMunger.h"
|
||||
#include "lightMutexHolder.h"
|
||||
#include "lightReMutexHolder.h"
|
||||
#include "clockObject.h"
|
||||
|
||||
GeomCacheManager *GeomCacheManager::_global_ptr = nullptr;
|
||||
@ -53,6 +55,9 @@ GeomCacheManager::
|
||||
*/
|
||||
void GeomCacheManager::
|
||||
flush() {
|
||||
// Prevent deadlock
|
||||
LightReMutexHolder registry_holder(GeomMunger::get_registry()->_registry_lock);
|
||||
|
||||
LightMutexHolder holder(_lock);
|
||||
evict_old_entries(0, false);
|
||||
}
|
||||
|
@ -149,6 +149,8 @@ private:
|
||||
|
||||
static PStatCollector _munge_pcollector;
|
||||
|
||||
friend class GeomCacheManager;
|
||||
|
||||
public:
|
||||
static TypeHandle get_class_type() {
|
||||
return _type_handle;
|
||||
|
Loading…
x
Reference in New Issue
Block a user