Added timing code for helping detect deadlocks in the paging threads
This commit is contained in:
parent
5c0fb93de8
commit
d3527f3830
@ -97,13 +97,18 @@ class OSGDB_EXPORT DatabasePager : public osg::NodeVisitor::DatabaseRequestHandl
|
|||||||
DatabaseThread(DatabasePager* pager, Mode mode, const std::string& name);
|
DatabaseThread(DatabasePager* pager, Mode mode, const std::string& name);
|
||||||
|
|
||||||
DatabaseThread(const DatabaseThread& dt, DatabasePager* pager);
|
DatabaseThread(const DatabaseThread& dt, DatabasePager* pager);
|
||||||
|
|
||||||
|
void setName(const std::string& name) { _name = name; }
|
||||||
|
const std::string& getName() const { return _name; }
|
||||||
|
|
||||||
void setDone(bool done) { _done = done; }
|
void setDone(bool done) { _done = done; }
|
||||||
bool getDone() const { return _done; }
|
bool getDone() const { return _done; }
|
||||||
|
|
||||||
void setActive(bool active) { _active = active; }
|
void setActive(bool active) { _active = active; }
|
||||||
bool getActive() const { return _active; }
|
bool getActive() const { return _active; }
|
||||||
|
|
||||||
|
double getTimeSinceStartOfIteration() const;
|
||||||
|
|
||||||
virtual int cancel();
|
virtual int cancel();
|
||||||
|
|
||||||
virtual void run();
|
virtual void run();
|
||||||
@ -117,6 +122,8 @@ class OSGDB_EXPORT DatabasePager : public osg::NodeVisitor::DatabaseRequestHandl
|
|||||||
DatabasePager* _pager;
|
DatabasePager* _pager;
|
||||||
Mode _mode;
|
Mode _mode;
|
||||||
std::string _name;
|
std::string _name;
|
||||||
|
osg::Timer_t _tickSinceStartOfIteration;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void setUpThreads(unsigned int totalNumThreads=2, unsigned int numHttpThreads=1);
|
void setUpThreads(unsigned int totalNumThreads=2, unsigned int numHttpThreads=1);
|
||||||
|
Loading…
Reference in New Issue
Block a user