mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -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 "geomCacheManager.h"
|
||||||
#include "geomCacheEntry.h"
|
#include "geomCacheEntry.h"
|
||||||
|
#include "geomMunger.h"
|
||||||
#include "lightMutexHolder.h"
|
#include "lightMutexHolder.h"
|
||||||
|
#include "lightReMutexHolder.h"
|
||||||
#include "clockObject.h"
|
#include "clockObject.h"
|
||||||
|
|
||||||
GeomCacheManager *GeomCacheManager::_global_ptr = nullptr;
|
GeomCacheManager *GeomCacheManager::_global_ptr = nullptr;
|
||||||
@ -53,6 +55,9 @@ GeomCacheManager::
|
|||||||
*/
|
*/
|
||||||
void GeomCacheManager::
|
void GeomCacheManager::
|
||||||
flush() {
|
flush() {
|
||||||
|
// Prevent deadlock
|
||||||
|
LightReMutexHolder registry_holder(GeomMunger::get_registry()->_registry_lock);
|
||||||
|
|
||||||
LightMutexHolder holder(_lock);
|
LightMutexHolder holder(_lock);
|
||||||
evict_old_entries(0, false);
|
evict_old_entries(0, false);
|
||||||
}
|
}
|
||||||
|
@ -149,6 +149,8 @@ private:
|
|||||||
|
|
||||||
static PStatCollector _munge_pcollector;
|
static PStatCollector _munge_pcollector;
|
||||||
|
|
||||||
|
friend class GeomCacheManager;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TypeHandle get_class_type() {
|
static TypeHandle get_class_type() {
|
||||||
return _type_handle;
|
return _type_handle;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user