Better tracking of resources associated with pathfinding.

This commit is contained in:
JoelKatz
2013-09-26 10:26:15 -07:00
committed by Vinnie Falco
parent 58a9a2cc07
commit 2b37a4c7b0
3 changed files with 10 additions and 2 deletions

View File

@@ -362,6 +362,8 @@ void PathRequest::updateAll (Ledger::ref ledger, bool newOnly, CancelCallback sh
{
std::set<wptr> requests;
LoadEvent::autoptr event (getApp().getJobQueue().getLoadEventAP(jtPATH_FIND, "PathRequest::updateAll"));
{
StaticScopedLockType sl (sLock, __FILE__, __LINE__);
requests = sRequests;

View File

@@ -17,9 +17,12 @@ class RippleLineCache;
#define PFR_PJ_NOCHANGE 0
#define PFR_PJ_CHANGE 1
class PathRequest : public boost::enable_shared_from_this<PathRequest>
class PathRequest : public boost::enable_shared_from_this<PathRequest>, public CountedObject <PathRequest>
{
public:
static char const* getCountedObjectName () { return "PathRequest"; }
typedef boost::weak_ptr<PathRequest> wptr;
typedef boost::shared_ptr<PathRequest> pointer;
typedef const pointer& ref;

View File

@@ -15,9 +15,12 @@ typedef boost::unordered_map <aciSource, unsigned int>::const_iterator curIssu
extern std::size_t hash_value (const aciSource& asValue);
// Holds a path state under incremental application.
class PathState
class PathState : public CountedObject <PathState>
{
public:
static char const* getCountedObjectName () { return "PathState"; }
class Node
{
public: