return this;\r
\r
// Elevate lock and recheck.\r
+ m_log.debug("timestamp of local resource changed, elevating to a write lock");\r
m_lock->unlock();\r
m_lock->wrlock();\r
if (m_filestamp>=stat_buf.st_mtime) {\r
// Somebody else handled it, just downgrade.\r
+ m_log.debug("update of local resource handled by another thread, downgrading lock");\r
m_lock->unlock();\r
m_lock->rdlock();\r
return this;\r
return this;\r
\r
// Elevate lock and recheck.\r
+ m_log.debug("reload interval for remote resource elapsed, elevating to a write lock");\r
m_lock->unlock();\r
m_lock->wrlock();\r
if (now - m_filestamp < m_reloadInterval) {\r
// Somebody else handled it, just downgrade.\r
+ m_log.debug("update of remote resource handled by another thread, downgrading lock");\r
m_lock->unlock();\r
m_lock->rdlock();\r
return this;\r
}\r
\r
// If we made it here, the swap may or may not have worked, but we need to relock.\r
+ m_log.debug("attempt to update resource complete, relocking");\r
m_lock->rdlock();\r
return this;\r
}\r