Added timing code for helping detect deadlocks in the paging threads

This commit is contained in:
Robert Osfield 2010-06-16 08:13:00 +00:00
parent 5c0fb93de8
commit d3527f3830

View File

@ -98,12 +98,17 @@ class OSGDB_EXPORT DatabasePager : public osg::NodeVisitor::DatabaseRequestHandl
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; }
bool getDone() const { return _done; }
void setActive(bool active) { _active = active; }
bool getActive() const { return _active; }
double getTimeSinceStartOfIteration() const;
virtual int cancel();
virtual void run();
@ -117,6 +122,8 @@ class OSGDB_EXPORT DatabasePager : public osg::NodeVisitor::DatabaseRequestHandl
DatabasePager* _pager;
Mode _mode;
std::string _name;
osg::Timer_t _tickSinceStartOfIteration;
};
void setUpThreads(unsigned int totalNumThreads=2, unsigned int numHttpThreads=1);