unsigned capacity;
unsigned size;
std::list<resource_load_error> error_queue;
+ Mutex data_size_mutex;
+ UInt64 loaded_data_size;
volatile bool done;
public:
public:
bool sync();
bool needs_work() const { return size<capacity; }
+ UInt64 get_and_reset_loaded_data_size();
void terminate();
};
mutable Mutex map_mutex;
ResourceMap resources;
LoadQueue queue;
+ UInt64 total_data_size;
UInt64 size_limit;
unsigned frame;
unsigned min_retain_frames;
void dispatch_work();
void unload_by_age();
void unload_by_size();
- UInt64 get_total_data_size_() const;
public:
- UInt64 get_total_data_size() const;
+ UInt64 get_total_data_size() const { return total_data_size; }
private:
static bool age_order(ManagedResource *, ManagedResource *);