Modernize RWLock
- Based on C++14's `shared_time_mutex` - No more need to allocate-deallocate or check for null - No pointer anymore, just a member variable - Platform-specific implementations no longer needed - Simpler for `NO_THREADS`
This commit is contained in:
@ -148,16 +148,15 @@ typedef Ref<Resource> RES;
|
||||
class ResourceCache {
|
||||
friend class Resource;
|
||||
friend class ResourceLoader; //need the lock
|
||||
static RWLock *lock;
|
||||
static RWLock lock;
|
||||
static HashMap<String, Resource *> resources;
|
||||
#ifdef TOOLS_ENABLED
|
||||
static HashMap<String, HashMap<String, int> > resource_path_cache; // each tscn has a set of resource paths and IDs
|
||||
static RWLock *path_cache_lock;
|
||||
static RWLock path_cache_lock;
|
||||
#endif // TOOLS_ENABLED
|
||||
friend void unregister_core_types();
|
||||
static void clear();
|
||||
friend void register_core_types();
|
||||
static void setup();
|
||||
|
||||
public:
|
||||
static void reload_externals();
|
||||
|
||||
Reference in New Issue
Block a user